If you’re running newer hardware, there are some definite advantages to installing a 64-bit operating system. But, if you still need to run any 32-bit applications, you’ll need to have the 32-bit support libraries installed. Different Linux distros handle this in different ways.
Just for clarity, Fedora runs 32-bit applications fine. If you install the 32-bit version you will have access to all of the apps you want. This article is simply to show one way of adding the possibility of 32-bit apps on a 64-bit system.
For 64-bit Ubuntu, finding the proper 32-bit support packages is a simple matter of opening up the Synaptic Package Manager, and searching for the string “ia32”. With 64-bit openSuSE, 32-bit support is already built-in, so you don’t have to do anything. With Fedora, though, it’s a whole different story. Not only are the 32-bit packages not already installed, the Fedora folk don’t provide any documentation on how to install them. The directions I found via Google were outdated, and wouldn’t work. I finally resolved the problem by asking a Red Hat employee in my local Linux Users Group.
Add an “rpm” Macro
This isn’t an absolute necessity, but it’s handy. Add the following line to the “/etc/rpm/macros” file:
%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch}
Now, when you query for information about rpm packages, you’ll be able to see whether they’re 32-bit or 64-bit packages.
sudo rpm -q SDL
SDL-1.2.13-9.fc11.x86_64
Add the Libraries
Next, add the 32-bit libraries by copying the following list, and pasting it into a text file. Save it as “Fedora-ia32.txt”.
arts.i586
audiofile.i586
bzip2-libs.i586
cairo.i586
compat-expat1-1.95.8-4.i586
compat-libstdc++-33-3.2.3-63.i586
compiz.i586
cyrus-sasl-lib.i586
dbus-libs.i586
directfb.i586
esound-libs.i586
fltk.i586
freeglut.i586
gphoto2.i586
gtk2.i586
hal-libs.i586
imlib.i586
jack-audio-connection-kit.1.i586
java.i586
lcms-libs.i586
lesstif.i586
libacl.i586
libaio-0.3.106-4.2.i586
libao.i586
libattr.i586
libcap.i586
libdrm.i586
libexif.i586
libgcrypt-1.4.0-3.i586
libgnomecanvas.i586
libICE.i586
libieee1284.i586
libsigc++20.i586
libSM.i586
libtool-ltdl.i586
libusb.i586
libwmf.i586
libwmf-lite.i586
libX11.i586
libXau.i586
libXaw.i586
libXcomposite.i586
libXdamage.i586
libXdmcp.i586
libXext.i586
libXfixes.i586
libxkbfile.i586
libxml2.i586
libXmu.i586
libXp.i586
libXpm.i586
libXScrnSaver.i586
libxslt.i586
libXt.i586
libXTrap.i586
libXtst.i586
libXv.i586
libXxf86vm.i586
lzo.i586
mesa-libGL.i586
mesa-libGLU.i586
nas-libs.i586
nss_ldap.i586
opencdk.i586
openldap.i586
pam.i586
popt.i586
pulseaudio-libs.i586
sane-backends-libs-gphoto2.i586
sane-backends-libs.i586
SDL.i586
svgalib.i586
unixODBC.i586
zlib.i586
Finally, “su” to a root shell, and run the following command:
# for i in $(< Fedora-ia32.txt ); do yum -y install $i; done
When the process completes, you can verify that you have both 32-bit and 64-bit packages installed.
sudo rpm -q SDL
SDL-1.2.13-9.fc11.x86_64
SDL-1.2.13-9.fc11.i586
A Caveat
By having to use the entire package name, all the way up through the arch designation, we open ourselves up to a slight problem. That is, package version numbers are also part of the package names. So, by the time you read this, the script may have been partially broken due to Fedora packages having been updated to newer versions. Here’s the way around that.
Go ahead and do the procedure as written. Then, as root, run the following command:
for i in $(< Fedora-ia32.txt ); do rpm -q >> rpm_results.txt $i; done
If package versions have changed, you’ll see a “not installed” error message for it in the output file. Then, you can open Yum Extender, and search for the update version to install.
Conclusion
The reason that the directions that I found via Google didn’t work, is that the package list referenced the “i386” packages that were part of Fedora 10. With Fedora 11, the “i386” packages have been replaced by “i586” packages
Article Submitted by Donnie Tevault
{ 23 comments }
installing 32bit (i586) packages in Fedora is as easy as:
(used Firefox as an example)
# yum install firefox.i586
and I’m sure you know that yum pulls all the dependencies automatically (aka. you don’t need to remember that long list )
oh, and you don’t need to add that rpm macro, rpm -q shows the arch by default!
With FC12, all of the i586 packages will disappear, and be replaced with i686 packages.
See: https://fedoraproject.org/wiki/Features/F12X86Support
There isn’t any need to do any of the steps in the article above. The way that Fedora does 32-bit support is the most well-engineered out of all the distros IMHO, because if you have to run a 32-bit application, you can just run:
yum install .i586
As Kyle noted, that will be .i686 in Fedora 12 and beyond. By the way, the macro isn’t necessary either. You can do this:
rpm -q –qf ‘%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n’
The –qf flag allows you to specify a “queryformat” that you can adjust to your needs. By the way, if you want to have that Red Hat employee get in touch with me, I work there too and would be happy to make sure he or she has up-to-date information to give out to other people. Thanks!
Argh, the < and > didn’t show up in my commands above. The first should be:
yum install <package>.i586
The second should be:
rpm -q –qf ‘%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n’ <package>
Sorry about that!
beginners will misunderstand and think that fedora is unable to deal with 32bits apps. As already said in comments, yum is doing fine with %{ARCH}.
btw, yum install -y $(< Fedora-ia32.txt) is certainly better than your for loop.
Great this worked for me!
Yeh, complicated stuff, but in practice most of the job is made by glibc!!! (Which is not listed!!! in the amazingly long list)
glibc goes togeher with nss-softokn-freebl
And, be careful: you cannot install glibc.i586 on a 64 system. Instead you want glibc.i686 which does the job.
Godd luck, Alex
While it may be true you can simply do “yum install .i586″ for an RPM package, this list is useful for programs NOT packaged as an RPM. I know it’s hard to believe there are actually things not included as an rpm, but there are! I found this very useful for installing SecondLife on F11 x86_64, for example, although it missed the audio components for some odd reason.
Actually, I’m trying to get a copy of Linux Enterprises for my Quad-Core 64 bit AMD machine, Phenom 9750. I run XP Pro/64 Commercial Client now and I think I need more stability.
Thank you,
I think what you want is a copy of centos the 64 bit version. CentOS is built from the source code of red Hat Enterprise. You can find that at centos.org.
Thanks – this was just the trick to get the Android 32 bit SDK working on my 64bit Fedora install. (where I can’t just run yum .i586.
Thanks again!
I tried the above steps on F10 but got like ‘No package libexif.i586 available.’ for the entire package list. I have F10-i386 DVD. Can I use the packages in it. How to go about it?
Thanks a lot for this page. For fedora 12 i replaced all 586 with 686. Rest of it worked.
My application is working fine with 32 bit linux machine.
When I am running same application over 64-bit, I am getting error like:
<<>>
Please help me to resolve this.
Can’t load ‘***/5.8.0/i686-linux/auto/GD/GD.so’ for module GD: libXpm.so.4: cannot open shared object file: No such file or directory at /usr/local/netman/perl/lib/5.8.0/i686-linux/DynaLoader.pm line 229.
Thank you verry much Donnie Tevault!!!
Very nice doc. Took me a while to realize that I need to change the i586 to i686. As it was stated this works for Fedora 12. It also now works for Fedora 13 which just released. Verified on my 64-bit system. Script is running now.
Thanks again!
Klandaghi Silentclaws
One liner to do this. It will install all i586 packages (not just libs) for the packages you already have installed. I could tidy/speed it up with an additional awk script to see if an i586 package for the installed rpm already exists, but it works if your patient.
yum list installed | sed -e ‘s/\..*//’ |awk ‘{ print $1 “.i586″ }’ | xargs yum install
From Fedora 13 it’s i686
It works. I stumbled upon this blog while trouble shooting android sdk plugin for eclipse on Fedora 13. After running the script,(changed 586 to 686) adb in tools did find the ld-linux.so.2 file in /lib folder.. so great
Hello there my friend
I want to ask you something… Here is my problem
I need to install xampp in a fedora 13 in a 64 bits server. When I try to do the things like you say in here:
# for i in $(< Fedora-ia32.txt ); do yum -y install $i; done
"It tells me that there is another app has hold the yum blocked, waiting to exit. The Other app is YUM"
This message also appears if I try like someone said here in your comments: "yum install .i586"
Can you please help me??
OK … i think ive got it… when the console tells me that there is another app trying to start and it shows me the file with somekind of a number
I just open that file and change that number…
Also ive tried commenting the file /op/lampp/lampp the part that says that xampp only works on 32 bit… bla bla bla, and it seems to work, but at the end it tells me that I need 32 libraries…
Doing a file with all the libs you put in here dosnt work for me… console says “XXX librari doesnt exist”
what should I do??