当我运行“openssl”我得到一个错误,如下所示:
openssl:加载共享库时出错:libcrypto.so.1.1:无法打开共享目标文件:没有这样的文件或目录“
根据这篇文章 ,我尝试更新OpenSSL后发生这种情况
有没有什么办法解决这一问题?
OS:CentOS 6.8 Web服务器:nginx / 1.10.2
更新#1:
[root@host ~]# yum info openssl Installed Packages Name : openssl Arch : x86_64 Version : 1.0.1e Release : 48.el6_8.3 Size : 4.0 M Repo : installed From repo : system-updates Summary : A general purpose cryptography library with TLS implementation URL : *** License : OpenSSL Description : The OpenSSL toolkit provides support for secure communications : between machines. OpenSSL includes a certificate management tool and : shared libraries which provide various cryptographic algorithms and : protocols. Available Packages Name : openssl Arch : i686 Version : 1.0.1e Release : 48.el6_8.3 Size : 1.5 M Repo : system-updates Summary : A general purpose cryptography library with TLS implementation URL : *** License : OpenSSL Description : The OpenSSL toolkit provides support for secure communications : between machines. OpenSSL includes a certificate management tool and : shared libraries which provide various cryptographic algorithms and : protocols.
安装openssl 1.1.0c的最新版本后,我遇到了同样的问题,我解决了将库文件libcrypto.so.1.1 , libcrypto.a和libssl.so从/usr/local/lib64复制到共享库的问题/usr/lib64 。
复制库后,您需要创build符号链接。
ln -s libcrypto.so.1.1 libcrypto.so ln -s libssl.so.1.1 libssl.so
在创build符号链接之后, 重buildldconfigcaching也是必需的:
sudo ldconfig
使用原始版本的OpenSSL,它知道如何查找共享库,因为/usr/lib64包含在链接程序的searchpath中。 当您下载并编译OpenSSL的“本地”副本时,共享库默认放置在/usr/local/lib64 。 所以你可能只需要将这个目录添加到链接器的searchpath中,就像这样(以root身份):
echo "/usr/local/lib64" > /etc/ld.so.conf.d/openssl.conf
然后执行:
ldconfig
我相信这会解决你的问题。
@ benedict说什么为我工作。 但是,您可能会发现某些符号链接指向较旧的版本。 从/ usr / libs运行ls -l libcrypto*会显示链接。 如下例所示:
lrwxrwxrwx 1 root root 16 May 21 15:28 libcrypto.so -> libcrypto.so.1.0
然后你想先删除现有的链接,inputsudo rm libcrypto.so然后复制libcrypto.so.1.1作为@ benedict提到。 最后你可以创build新的链接。 sudo ln -s libcrypto.so.1.1 libcrypto.so
希望这可以帮助。
您可以使用重新安装
yum install -y openssl-devel
我经历了完全相同的问题…我已经通过运行以下命令来解决它。
ln -s /usr/local/lib/libcrypto.so.1.1 /usr/lib/libcrypto.so.1.1
这将创build一个软链接,你很好去。
在构build并安装open ssl-1.1.0f之后,我为lib libssl.so.1.1修复了同样的错误:创build一个软链接:
ln -s /usr/local/lib/libssl.so.1.1 /usr/lib/libssl.so.1.1