Mingw is a cross-compiler to compile windows-oriented exploit code into a windows PE executable within the Linux environment. Unfortunately, current version of Kali installed on my VM is 4.17 can’t find mingw32 when I try to download it with (apt-get install mingw32). It returns (E: Unable to locate package mingw32).
Solution:
- Run this command to edit the sources.list (nano /etc/apt/sources.list)
- Comment out any repositories by adding # at the beginning of the line
- Add these 2 repositories and save the file:
deb http://old.kali.org/kali sana main non-free contrib
deb-src http://old.kali.org/kali sana main non-free contrib
4. Run the following command (apt-get clean && apt-get update)
Now, you should be able to run (apt-get install mingw32). After you’re done, you should comment out the repositories you added and uncomment the ones you commented out earlier. Then run (apt-get clean && apt-get update).