3

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?

Gryu
  • 8,002
  • 9
  • 37
  • 53

3 Answers3

7

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

and

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
Gryu
  • 8,002
  • 9
  • 37
  • 53
pl_rock
  • 11,715
0

I met such an issue from a command from a chip vendor:

sudo apt-get install gawk git gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386

I am working on a 64-bit platform, so I changed mingw32 to mingw-w64 and it passed.

-1

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.