最近几天,我对 CURL 有点担心。我收到以下错误:
curl: / lib/i386-linux-gnu/libssl.so.1.0.0: version `OPENSSL_1.0.1 'not found (required by / usr/lib/i386-linux-gnu / libcurl.so.4)
我试过:
php-i | grep curl :
PHP Warning: PHP Startup: Unable to load dynamic library '/ usr/lib/php5/20090626 + lfs / curl.so' - / lib/i386-linux-gnu/libssl.so.1.0.0: version `OPENSSL_1.0.1 'not found (required by / usr/lib/i386-linux-gnu/libcurl.so.4) in Unknown on line 0
/ etc/php5/cli/conf.d/curl.ini
或者 :
apt-file search libssl.so.1.0.0
E: The Cache is empty. You need to run 'apt-file update' first.
和 :
apt-file update :
curl: /lib/i386-linux-gnu/libssl.so.1.0.0: version `OPENSSL_1.0.1' not found (required by /usr/lib/i386-linux-gnu/libcurl.so.4)
Download of http://ppa.launchpad.net/yannubuntu/os-uninstaller/ubuntu/dists/precise/Contents-i386.gz failed
Command exited with code
因此,我重新安装:
sudo apt-get install libssl-dev
sudo ln -s /usr/lib/libssl.so.1.0.0 /usr/lib/libssl.so.1.0.1
sudo apt-get remove --purge curl php5-curl libssl-dev
sudo apt-get clean
sudo apt-get autoremove --purge
sudo apt-get install --reinstall libssl1.0.0
sudo apt-get install curl php5-curl
同样的问题.... :(
还有一些信息:
dpkg -l libcurl3
||/ Nom Version Description
+++-===========================-===========================-================================
ii libcurl3 7.22.0-3ubuntu4 Multi-protocol file transfer library (OpenSSL)
ls -l /usr/lib/php5/20090626+lfs/curl.so :
-rw-r--r-- 1 root root 71172 janv. 19 00:50 /usr/lib/php5/20090626+lfs/curl.so
cat /etc/php5/cli/conf.d/curl.ini :
; configuration for php CURL module
extension=curl.so
curl -V :
curl: /lib/i386-linux-gnu/libssl.so.1.0.0: version `OPENSSL_1.0.1' not found (required by /usr/lib/i386-linux-gnu/libcurl.so.4)
apt-cache policy curl :
curl:
Installé : 7.22.0-3ubuntu4
Candidat : 7.22.0-3ubuntu4
Table de version :
*** 7.22.0-3ubuntu4 0
500 http://fr.archive.ubuntu.com/ubuntu/ precise/main i386 Packages
100 /var/lib/dpkg/status
7.21.6-3ubuntu3.2 0
-1 http://security.ubuntu.com/ubuntu/ oneiric-security/main i386 Packages
当然:(,我又遇到这个问题了。
有谁能够帮助我 ?
谢谢
答案1
看来您的 curl 链接到了系统上无法找到的 ssl 库。如果您ldd /usr/lib/i386-linux-gnu/libcurl.so.4
对 libssl 执行类似“我猜”的操作,它会告诉您“未找到”?
这个是 64 位系统还是 32 位系统。如果是 64 位系统,可能 /usr/lib 甚至没有被搜索 .so 文件。要修复此问题,请尝试以下操作
echo "/usr/lib" > /etc/ld.so.conf.d/32bit_libs.conf
ldconfig
然后尝试curl
再次运行命令
否则你也可以尝试这个:
sudo ln -s /usr/lib/libssl.so.1.0.0 /lib/i386-linux-gnu/libssl.so.1.0.0
因为这似乎是 ld 正在寻找库的地方
答案2
ldd 命令返回以下内容:
ldd /usr/lib/i386-linux-gnu/libcurl.so.4
/usr/lib/i386-linux-gnu/libcurl.so.4: /lib/i386-linux-gnu/libssl.so.1.0.0: version `OPENSSL_1.0.1' not found (required by /usr/lib/i386-linux-gnu/libcurl.so.4)
linux-gate.so.1 => (0xb77db000)
libidn.so.11 => /usr/lib/i386-linux-gnu/libidn.so.11 (0xb772c000)
liblber-2.4.so.2 => /usr/lib/i386-linux-gnu/liblber-2.4.so.2 (0xb771d000)
libldap_r-2.4.so.2 => /usr/lib/i386-linux-gnu/libldap_r-2.4.so.2 (0xb76ca000)
librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb76c1000)
libgssapi_krb5.so.2 => /usr/lib/i386-linux-gnu/libgssapi_krb5.so.2 (0xb7683000)
libssl.so.1.0.0 => /lib/i386-linux-gnu/libssl.so.1.0.0 (0xb7636000)
libcrypto.so.1.0.0 => /lib/i386-linux-gnu/libcrypto.so.1.0.0 (0xb7492000)
librtmp.so.0 => /usr/lib/i386-linux-gnu/librtmp.so.0 (0xb7477000)
libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb7461000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb72b7000)
libresolv.so.2 => /lib/i386-linux-gnu/libresolv.so.2 (0xb729f000)
libsasl2.so.2 => /usr/lib/i386-linux-gnu/libsasl2.so.2 (0xb7283000)
libgssapi.so.3 => /usr/lib/i386-linux-gnu/libgssapi.so.3 (0xb7245000)
libgnutls.so.26 => /usr/lib/i386-linux-gnu/libgnutls.so.26 (0xb7181000)
libgcrypt.so.11 => /lib/i386-linux-gnu/libgcrypt.so.11 (0xb70fc000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb70e1000)
libkrb5.so.3 => /usr/lib/i386-linux-gnu/libkrb5.so.3 (0xb7012000)
libk5crypto.so.3 => /usr/lib/i386-linux-gnu/libk5crypto.so.3 (0xb6fe9000)
libcom_err.so.2 => /lib/i386-linux-gnu/libcom_err.so.2 (0xb6fe4000)
libkrb5support.so.0 => /usr/lib/i386-linux-gnu/libkrb5support.so.0 (0xb6fdb000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb6fd6000)
/lib/ld-linux.so.2 (0xb77dc000)
libheimntlm.so.0 => /usr/lib/i386-linux-gnu/libheimntlm.so.0 (0xb6fce000)
libkrb5.so.26 => /usr/lib/i386-linux-gnu/libkrb5.so.26 (0xb6f4a000)
libasn1.so.8 => /usr/lib/i386-linux-gnu/libasn1.so.8 (0xb6ea5000)
libhcrypto.so.4 => /usr/lib/i386-linux-gnu/libhcrypto.so.4 (0xb6e70000)
libroken.so.18 => /usr/lib/i386-linux-gnu/libroken.so.18 (0xb6e5a000)
libtasn1.so.3 => /usr/lib/i386-linux-gnu/libtasn1.so.3 (0xb6e48000)
libp11-kit.so.0 => /usr/lib/i386-linux-gnu/libp11-kit.so.0 (0xb6e35000)
libgpg-error.so.0 => /lib/i386-linux-gnu/libgpg-error.so.0 (0xb6e30000)
libkeyutils.so.1 => /lib/i386-linux-gnu/libkeyutils.so.1 (0xb6e2c000)
libwind.so.0 => /usr/lib/i386-linux-gnu/libwind.so.0 (0xb6e03000)
libheimbase.so.1 => /usr/lib/i386-linux-gnu/libheimbase.so.1 (0xb6df4000)
libhx509.so.5 => /usr/lib/i386-linux-gnu/libhx509.so.5 (0xb6dac000)
libsqlite3.so.0 => /usr/lib/i386-linux-gnu/libsqlite3.so.0 (0xb6d07000)
libcrypt.so.1 => /lib/i386-linux-gnu/libcrypt.so.1 (0xb6cd6000)
然后我“回显”了 conf 文件 + ldconfig :什么都没发生。我又遇到了 curl 错误。
符号链接不起作用:
sudo ln -s /usr/lib/libssl.so.1.0.0 /lib/i386-linux-gnu/libssl.so.1.0.0
ln: impossible de créer le lien symbolique «/lib/i386-linux-gnu/libssl.so.1.0.0»: Le fichier existe
文件 /lib/i386-linux-gnu/libssl.so.1.0.0存在。
法布里斯