error while loading shared libraries: libssl.so.6

时间:2020-12-08 13:27:13

执行  scripts/mysql_install_db --user=mysql 

安装mysql的时候报错:

./bin/my_print_defaults: error while loading shared libraries: libssl.so.6: cannot open shared object file: No such file or directory
FATAL ERROR: Neither host '172-16-4-12' nor 'localhost' could be looked up with
./bin/resolveip
Please configure the 'hostname' command to return a correct
hostname.
If you want to solve this at a later stage, restart this script
with the --force option


解决办法: 

cd /usr/lib64


[root@172-16-4-12 lib64]# ll *ssl*
-rwxr-xr-x  1 root root 261248 Nov  4 17:50 libssl3.so
lrwxrwxrwx  1 root root     16 Dec 15 10:02 libssl.so -> libssl.so.1.0.1e
lrwxrwxrwx  1 root root     16 Dec 15 10:02 libssl.so.10 -> libssl.so.1.0.1e
-rwxr-xr-x  1 root root 441256 Dec 14 13:16 libssl.so.1.0.1e


如果有 则  执行 

ln -s libssl.so.1.0.1e libssl.so.6

如果没有安装 这需要在网上下载安装


同理: error while loading shared libraries: libcrypto.so.6: cannot open shared object

这个错误也用相同的办法处理