Skip to main content

How to Run 32-bit Apps in 64-bit Linux

Most Linux distributions have 64-bit versions for x86_64 processors, such as the AMD Athlon II or the Intel Xeon. Since these distributions maintain their own package repositories, they usually provide binary packages for all of their supported applications. If you are completely content with your out-of-box Linux installation, you may never need to run a 32-bit program.

Some commercial Linux software, particularly games, only provide 32-bit versions. In these rare cases, you will need to configure your 64-bit machine to run 32-bit software.

Install the 32-bit libraries

Because x86_64 processors are designed over x86 technology, they are still able to support 32-bit programs without any hardware emulation, like what you would need to run x86 programs in a PowerPC or Sparc environment. In Linux, all you need to do is install the necessary software libraries to run the 32-bit software. Fortunately, many Linux distributions package these libraries for you. In Ubuntu, for example, the package is called ia32-libs. To install it, just open a terminal window and type:

$ sudo apt-get install ia32-libs

You can also install it graphically from within Synaptic or Kpackagekit on Kubuntu.

Once installed, applications like Skype and games like World of Padman should work without further configuration.

GTK Issues

When running 32-bit programs in a 64-bit environment, Ubuntu still looks for the default GTK engines. This will cause you to receive an error such as this: “wrong ELF class”. This type of error can be particularly annoying in applications like Chromium, the new open source version of the Google Chrome browser.

Ubuntu does actually install the default 32-bit version of the GTK engines in /usr/lib32/gtk-2.0, but what I discovered in my case was that GTK themes like the one I was using, qtcurve, were not found in this directory. The result was really ugly GTK programs.

The quick solution was to do the following:

1. Find the 32-bit package of the theme you are using. In my case, I searched ubuntu packages.

2. Download the package and extract its contents like you would a normal compressed file.

3. Find the library file for the theme. For qtcurve it was found at ~/download-directory/usr/lib/gtk-2.0/2.10.0/engines/libqtcurve.so.

4. Copy the library to the lib32 directory:
$ sudo cp ~/download-directory/usr/lib/gtk-2.0/2.10.0/engines/libqtcurve.so /usr/lib32/gtk-2.0/2.10.0/engines/
For Chromium this was all that was required because the Chromium startup script was already configured to look in /usr/lib32/gtk-2.0. If the startup script of the program you are running does not look there but instead looks to /usr/lib/gtk-2.0, you will need to modify the startup script or export an environment variable before starting it by opening a terminal window and typing:
export GTK_PATH=/usr/lib32/gtk-2.0
command-to-start-app
If there is no startup script for the program, you could create one with the above environment variable set.

If All Else Fails

I have found some applications, such as Boxee, refuse to behave nicely in a 64-bit environment under any normal circumstances, even with ia32-libs installed. The only viable alternative besides chucking your 64-bit machine or chucking the software is to run it in a chroot environment. This literally installs an entire 32-bit version of your operating system within a directory on your computer. It will take more space than simply installing a few libraries, but it ensures that all of the 32-bit components, including 3D graphics kernel modules, are installed.

You can read a guide to setting up a 32-bit chroot on Ubuntu Forums.


Original post: http://maketecheasier.com/run-32-bit-apps-in-64-bit-linux/2009/08/10

Comments

Popular posts from this blog

How to install Skype on Ubuntu 10.04 Lucid Lynx

UPDATE: Skype has now been uploaded to the "partner" official Ubuntu 10.04 Lucid Lynx repository. See Install Skype in Ubuntu 10.04 Lucid Lynx from official partner repository Command Line way Get the package: For 32-bit $ wget http://www.skype.com/go/getskype-linux-beta-ubuntu-32 For 64-bit $ wget http://www.skype.com/go/getskype-linux-beta-ubuntu-64 You will need to install the following libraries. $ sudo apt-get install libqt4-dbus libqt4-network libqt4-xml libasound2 Now install skype(the file u just downloaded, may be named intrepid-ibex) $ sudo dpkg -i skype-XXXXXXXXXXXX.deb If you still get some dependency error then just type the command below $ sudo apt-get -f install this will install the dependencies and the skype. Non - Terminal Download the setup 32 -bit 64 -bit You will these packages: libqt4-dbus libqt4-network libqt4-xml . Goto Synaptic manager and install them. Now Launch the Skype install .deb file (just double click it) and follow the on screen prompts....

gtalx: Howto Gtalk in ubuntu ( google talk )

Did you fail to use " gtalk in ubuntu " ... Now you can chat and talk to your gmail buddies in ubuntu... 1. check for gtk2.0 and qt4 $ sudo apt-get install libgtk2.0-dev $ sudo apt-get install libqt4-dev libogg-dev libtheora-dev $ sudo apt-get install libsdl-dev libavcodec-dev libswscale-dev $ sudo apt-get install libexpat-dev libraw1394-dev libvorbis-dev $ sudo apt-get install libgsm1-dev  libspeexdsp-dev libmediastreamer0-dev libortp-dev 2. Remove 'pulse audio sound server' Open synaptic package manager and remove pulse audio 3. "Download gtalx" from here Dowload it here 4. Extract the file.... $ tar -zxvf 0.0.4.tar.gz 5. Get into the directory.... $ cd 0.0.4 and then... $ sudo chmod u+x make $ ./make $ sudo ./make install 6. Enjoy..... Please comment about your installation(whether it was a success or not....) Take gtalx from Applications > Internet > gtalx Enter your gmail login information..and click connect... ...

How to install Skype on Ubuntu 9.10 Karmic Koala

The two methods  below doesn't work now. Please see http://blog.dipinkrishna.info/2009/11/how-to-download-and-install-skype-for_3060.html for a successfull installation of skype on ubuntu. I have provided two methods. Please do comment which one is successful. Follow these steps to install skype in ubuntu 9.10 (64 bit).         First add:             deb http://packages.medibuntu.org/ karmic free non-free         to your source.list Now open a terminal and type: $ sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list Then do an update: $ sudo apt-get update $ sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring $ sudo apt-get -q update And finally install Skype. $ sudo apt-get install skype Ready ... now start skype with $ skype OR Download the setup 32 -bit 64 -bit Launch the Skype i...