筆記: libssl.so.1.0.0: cannot open shared object file: No such file or directory

2017050209:23
安裝/更新 openssl 後的錯誤問題

Apache httpd 出現錯誤:
Cannot load modules/mod_ssl.so into server: libssl.so.1.0.0: cannot open shared object file: No such file or directory


或是


PHP 出現錯誤:
php: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory



解決

# ldd /usr/bin/openssl
linux-vdso.so.1 =>  (0x00007ffd21fe5000)
libssl.so.1.0.0 => /usr/local/ssl/lib/libssl.so.1.0.0 (0x00007f164417f000)
libcrypto.so.1.0.0 => /usr/local/ssl/lib/libcrypto.so.1.0.0 (0x00007f1643d48000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003cd3e00000)
libc.so.6 => /lib64/libc.so.6 (0x0000003cd3600000)
/lib64/ld-linux-x86-64.so.2 (0x0000003cd2e00000)


# sudo ln -s /usr/local/ssl/lib/libssl.so.1.0.0 /usr/lib/libssl.so.1.0.0
# sudo ln -s /usr/local/ssl/lib/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.1.0.0