Ubuntu apt-get install ia32 for 32-bit on 64-bit 兼容64位
Ubuntu apt-get install ia32 for 32-bit on 64-bit
To install 32-bit libraries on a 64-bit linux system
Install:
$ apt-get install ia32-libs
To install 32-bit libraries for development
Install:
$ apt-get install lib32gcc1 libc6-i386 lib32z1 lib32stdc++6 $ apt-get install lib32asound2 lib32ncurses5 lib32gomp1 lib32z1-dev lib32bz2-dev $ apt-get install g++-multilib
You may need this too, or it may be a virtual package already provided:
$ apt-get install ia32-libs-gtk
You may need a symlink, which g++-multilib may set up for you automatically:
$ ln -s /usr/lib32/libstdc++.so.6 /usr/lib32/libstdc++.so
Update LD_LIBRARY_PATH
You may need to add the LD path, for example like this:
$ edit /etc/profile ... add these lines... LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib32:/usr/lib32 export LD_LIBRARY_PATH
To compile with gcc
To compile things with gcc, you need to add the flag -m32 like this:
gcc -m32 myfile.c
http://sixarm.com/about/ubuntu-apt-get-install-ia32-for-32-bit-on-64-bit.html
浙公网安备 33010602011771号