Error:
mongodb install error: mongod: error while loading shared libraries: liblzma.so.0: cannot open shared object file: No such file or directory
Screeshots:
Solution:
1. Modify the /etc/profile file
Check the environment variables, however, no error was found
2. Modify the /etc/ld.so.conf file
1. After adding /usr/local/lib
to /etc/ld.so.conf
, I found that there is no liblzma.so.0
in this directory, only liblzma.so.5
2. At the command line, type sudo find / -name liblzma.so.0* -type f
and find that liblzma.so.0
is not found
3. Type yum install xz-compat-libs
on the command line to download liblzma.so.0
4. OK!