Missing Dynamic Link Library
Symptom
When I run a command to verify binary files in CentOS 7.6.1810, the following information is displayed:
1 | cmake: error while loading shared libraries: libarchive.so.13: cannot open shared object file: No such file or directory |
Possible Causes
The OS does not have the corresponding dynamic link library (DLL) file.
Solution
- Go to the directory where the extracted files are stored and view the shared libraries required for program running. The following uses CentOS 7.6.1810 as an example.
1 2
cd /home/usr/bin ldd cmake
The following information is displayed:
1 2 3 4 5 6 7 8 9 10 11
linux-vdso.so.1 => (0x0000ffff9c180000) libdl.so.2 => /lib64/libdl.so.2 (0x0000ffff9c130000) libexpat.so.1 => /lib64/libexpat.so.1 (0x0000ffff9c0e0000) libz.so.1 => /lib64/libz.so.1 (0x0000ffff9c0a0000) libarchive.so.13 => not found libcurl.so.4 => /lib64/libcurl.so.4 (0x0000ffff9c010000) libstdc++.so.6 => /lib64/libstdc++.so.6 (0x0000ffff9bee0000) libm.so.6 => /lib64/libm.so.6 (0x0000ffff9be20000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000ffff9bde0000) libc.so.6 => /lib64/libc.so.6 (0x0000ffff9bc50000) ...
It is verified that the libarchive.so.13 file is missing.
- Query the software package containing libarchive.so.13.
1yum provides */libarchive.so.13
The following information is displayed:
1 2 3 4 5 6 7 8 9
Loaded plugins: fastestmirror, priorities Loading mirror speeds from cached hostfile * base: ftp.yz.yamagata-u.ac.jp * extras: ftp.yz.yamagata-u.ac.jp * updates: ftp.yz.yamagata-u.ac.jp libarchive-3.1.2-14.el7_7.aarch64 : A library for handling streaming archive formats Repo : base Matched from: Filename : /usr/lib64/libarchive.so.13
- Install the queried software package.
1yum install -y libarchive-3.1.2-14.el7_7.aarch64
Parent topic: Troubleshooting
