A project I'm trying to compile needs mingw32. apt-get install gives me Unable to locate package mingw32.

Doing an apt cache search yields many options and I need help choosing one that will work or eliminate this error.

System info:

4.2.0-16-generic #19-Ubuntu SMP Thu Oct 8 15:35:06 UTC 2015

Any ideas?

2 Answers 2


This package is in universe repository of Ubuntu. So make sure you have enabled universe in /etc/apt/sources.list

To install it use the command:

sudo apt-get install mingw32

It will install packages mingw32 mingw32-binutils mingw32-runtime automatically


sudo apt-cache search mingw32

mingw32 - Minimalist GNU win32 (cross) compiler
mingw32-binutils - Minimalist GNU win32 (cross) binutils
mingw32-runtime - Minimalist GNU win32 (cross) runtime

no need to select one. These packages are dependency of mingw32

Note : Currently these packages are available in trusty, utopic and earlier version of Ubuntu. If you are using the latest Ubuntu version then check Ubuntu package search if package available or not. If not then either download package and install manually or download source and compile it.

EDIT: You can also try this:

For 32bit system:

wget http://archive.ubuntu.com/ubuntu/pool/universe/m/mingw32/mingw32_4.2.1.dfsg-2ubuntu1_i386.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/m/mingw32-binutils/mingw32-binutils_2.20-0.2ubuntu1_i386.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/m/mingw32-runtime/mingw32-runtime_3.15.2-0ubuntu1_all.deb

For 64bit system

wget http://archive.ubuntu.com/ubuntu/pool/universe/m/mingw32/mingw32_4.2.1.dfsg-2ubuntu1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/m/mingw32-binutils/mingw32-binutils_2.20-0.2ubuntu1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/m/mingw32-runtime/mingw32-runtime_3.15.2-0ubuntu1_all.deb

Install these packages using the command:

sudo dpkg -i *.deb

If it shows dependencies then use command :

sudo apt-get install -f

and again install

 sudo dpkg -i *.deb
  • I'm running wily & yes universe is enabled Oct 26, 2015 at 7:18
  • try updated answer .
    – pl_rock
    Oct 26, 2015 at 15:17
  • changing the OS to ubuntu-14.04-lamp_64bit seems to have solved all my problems. Thanks! Oct 26, 2015 at 18:36

I had the same issue. https://stackoverflow.com/questions/60387020/unable-to-locate-package-any-package-mingw32-mingw64-curses-on-ubuntu-18-04/60389640#60389640

The package name you're using is incorrect. go to this link and check the for the correct package name. https://packages.ubuntu.com/

Or see the above mentioned linked you'll see all the steps to follow.

I hope this will help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.