2

I get the following error when I type rpm:

rpm: error while loading shared libraries: librpm-4.3.so: cannot open shared object file: No such file or directory

How could this library have gone missing? How can I get these packages and fix my version of rpm for my OS (CentOS 6.7)? Thanks!

2
  1. Navigate to the Centos Mirror.
  2. Select your architecture (i386 for 32bit, x86_64 for 64bit)
  3. Click the Packages link
  4. Download the rpm-libs-4.8.0-55.el6.[arch].rpm package.
  5. cd to the root directory cd /
  6. Unpack the rpm using: sudo rpm2cpio /path/to/rpm-libs-4.8.0-55.el6.[arch].rpm | cpio -idmv

This will unpack and install 3 libraries and 3 symlinks in the package to where they belong.

If you are more cautious, unpack them to a working directory and manually move them over, paying strict attention to syslinks and permissions.

On my system (Centos 6.7, x86_64) the packages are in /usr/lib64 with the following permissions:

lrwxrwxrwx. 1 root root     20 Oct 24 20:13 librpmbuild.so.1 -> librpmbuild.so.1.0.0
-rwxr-xr-x. 1 root root 155344 May 10  2016 librpmbuild.so.1.0.0
lrwxrwxrwx. 1 root root     17 Oct 24 20:13 librpmio.so.1 -> librpmio.so.1.0.0
-rwxr-xr-x. 1 root root 183968 May 10  2016 librpmio.so.1.0.0
lrwxrwxrwx. 1 root root     15 Oct 24 20:13 librpm.so.1 -> librpm.so.1.0.0
-rwxr-xr-x. 1 root root 435496 May 10  2016 librpm.so.1.0.0
2
  • Thanks; I can't run this, though, because rpm2cpio depends upon the same library. – jxmorris12 Oct 25 '17 at 20:03
  • 1
    In this case, you will probably need to unpack the files on another Linux host and manually move them into place on the effected host. Unpack the RPM as a normal user (not sudo) into a working directory. After moving them into place, set the permissions as above. (chown root:root librpm*) – Glenn Bell Oct 25 '17 at 22:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.