Installing .so libraries on a 64-bit Fedora with yum
This post was written by eli on January 11, 2010
Posted Under: Linux,oddities,Software,Virtualization
Posted Under: Linux,oddities,Software,Virtualization
A short note about installing libraries on an Intel 64 bit machine (Fedora 12 in my case).
It all starts with a short conversation like this one:
[root@short Downloads]# rpm -i VirtualBox-3.1-3.1.2_56127_fedora12-1.x86_64.rpm error: Failed dependencies: libQtGui.so.4()(64bit) is needed by VirtualBox-3.1-3.1.2_56127_fedora12-1.x86_64 libQtOpenGL.so.4()(64bit) is needed by VirtualBox-3.1-3.1.2_56127_fedora12-1.x86_64
THE WRONG THING TO DO IS:
[root@short Downloads]# yum install libQtGui.so.4
because it will install the right library, but for 32 bit (note the i686 suffix). There must be an elegant way to come around this. Until I find it out, I’ll go:
[root@short Downloads]# yum whatprovides libQtGui.so.4 Loaded plugins: presto, refresh-packagekit 1:qt-x11-4.5.3-7.fc12.i686 : Qt GUI-related libraries Repo : fedora Matched from: Other : libQtGui.so.4
(this entry possibly duplicated for each repository)
Now we have the name of the 32-bit package, qt-x11-4.5.3-7.fc12.i686 in our case. Just replace i686 with x86_64, and off we go:
[root@short Downloads]# yum install qt-x11-4.5.3-9.fc12.x86_64
It is left as an exercise to explain why yum would load i686 files when running on a x86_64 machine. Tell me if you get the logic.
Another thing is that one can match against file names:
[root@short eli]# yum whatprovides "*libXm.so.*" Loaded plugins: presto, refresh-packagekit lesstif-0.95.2-1.fc12.i686 : OSF/Motif library clone Repo : fedora Matched from: Filename : /usr/lib/libXm.so.2 Filename : /usr/lib/libXm.so.2.0.1 Other : libXm.so.2