LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   rpm and yum commands failing on CentOS 4.2 (https://www.linuxquestions.org/questions/linux-newbie-8/rpm-and-yum-commands-failing-on-centos-4-2-a-426918/)

amussaw 03-21-2006 09:11 AM

rpm and yum commands failing on CentOS 4.2
 
I recently "inherited" the linux machines at my job. I'm fairly familiar with getting around in linux, but not with installing and updating so much...this is all quite new to me.

After doing some research, I found that yum works best for updating and rpm seems to work best for installing. Unfortunately, neither of them work on this inherited machine. I would love to tell you what was done to cause this, but the former admin is not on good terms...

When I run yum, I get:

Quote:

Traceback (most recent call last):
File "/usr/bin/yum", line 22, in ?
import yummain
File "/usr/share/yum/yummain.py", line 22, in ?
import clientStuff
File "/usr/share/yum/clientStuff.py", line 18, in ?
import rpm
ImportError: libselinux.so.1: cannot open shared object file: No such file or directory
And when I run rpm, I get:

Quote:

rpm: error while loading shared libraries: librpm-4.2.so: cannot open shared object file: No such file or directory
ANY help would be greatly appreciated.

Thanks,

Andy

reddazz 03-21-2006 10:06 AM

Try reinstalling rpm and libselinux (You can get the rpms from a CentOS mirror). Because rpm is already installed, you have to do
Code:

#rpm -Uvh --nodeps --force rpm-VERSION.rpm
The same would apply if libselinux is already installed.


All times are GMT -5. The time now is 03:26 PM.