Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using linux ubuntu with metasploit framework, i have a shell script which contains the following lines in the first begining of the file. At first glance i thought that i should install the the mingw32 package, so i uses the following line in terminal apt-get install mingw32-runtime mingw-w64 mingw gcc-mingw32 mingw32-binutils

but when i compile the below script, it still says that i must install mingw-w64n binutilis-mingw......etc

   #Lets check for MinGW32
   if  builtin type -p i686-w64-mingw32-gcc > /dev/null ; then 

   echo "Here is a network device list available on yor machine"
   else echo "Please install the mingw-w64, binutils-mingw-w64, gcc-mingw-w64, mingw- w64-dev, mingw-w64-tools"
   echo "exiting.....";  exit

Could some one help me what to write in the terminal in order to get the required packages installed with my linux ubuntu

share|improve this question

migrated from Jan 24 '12 at 11:47

This question came from our site for professional and enthusiast programmers.

Did you try apt-get install install mingw-w64n binutilis-mingw ? – Shiplu Jan 23 '12 at 11:51

It calls the bash builtin type with an option -p to find out the path to binary if one exists. Then it discards unneeded output and spits message if the command failed (it fails if there's no binary in sight).

to install packages use the apt-get install mingw-w64 or whatever.../

share|improve this answer
mingw-w64 is already the newest version. The following packages were automatically installed and are no longer required: libdmraid1.0.0.rc16 python-pyicu libdebian-installer4 cryptsetup libecryptfs0 reiserfsprogs rdate bogl-bterm ecryptfs-utils libdebconfclient0 dmraid keyutils Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 69 not upgraded. – Rafik Bari Jan 23 '12 at 11:53
What about the rest? Like gcc-mingw-w64 etc? – Michael Krelin - hacker Jan 23 '12 at 13:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.