Wednesday, June 25, 2014

How to determine which yum package to install

If you have a library that's missing and can't quite figure out what provides the file, you can ask yum:

yum whatprovides '*/libz.so.1"

32 bit compatability

If you don't install rpms a lot, you get a little rusty. If you have a 32 bit program on your 64 bit server (or vice versa) you will know it when you get an error like this:

/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

If you link to the wrong version. Say you're file is linked to a 64 bit version at compile time and you alter the LD_LIBRARY_PATH (thinking you're going to fix it,) you will resolve the link, but since its not the right version you will get:

wrong ELF class:

To install the 32 bit compatibility, you should install the .i686 version e.g.

yum install -y libz.i686

You can also add the compatibility while you're at it:

 yum groupinstall "Compatibility libraries"