`

libssl.so.10: cannot open shared object file: No such file or directory

阅读更多
yum 安装不管用了,先执行了 yum remove openssl命令导致的。卸载日志见《yum remove openssl 卸载日志.txt》

紧接着有运行了如下命令:
[root@hadoop jengined-1.7.2]# rpm -q -a|grep openssl
openssl-1.0.1e-15.el6.x86_64
openssl-devel-1.0.1e-15.el6.x86_64
[root@hadoop jengined-1.7.2]# rpm -e openssl-devel-1.0.1e-15.el6.x86_64 --nodeps
[root@hadoop jengined-1.7.2]# rpm -e openssl-1.0.1e-15.el6.x86_64 --nodeps
[root@hadoop jengined-1.7.2]# rpm -q -a|grep openssl
[root@hadoop jengined-1.7.2]#

彻底删除openssl

之后,yum中提示:libssl.so.10: cannot open shared object file: No such file or directory


解决问题如下:
[root@hadoop jengined-1.7.2]# yum install openssl-1.0.1e-15.el6.x86_64
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   libssl.so.10: cannot open shared object file: No such file or directory

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Nov 22 2013, 12:16:22)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]

If you cannot solve this problem yourself, please go to
the yum faq at:
  http://yum.baseurl.org/wiki/Faq
 

[root@hadoop jengined-1.7.2]#
(1)下载
https://www.openssl.org/source/old/1.0.1/openssl-1.0.1e.tar.gz
执行./config shared zlib-dynamic 来生成Makefile文件。
通过make来生成生成libssl.so.1.0.0和libcrypto.so.1.0.0

(2)编译
[root@hadoop jengined-1.7.2]# ./config shared zlib-dynamic
[root@hadoop jengined-1.7.2]# make
提示错误
make[4]: *** [link_a.gnu] Error 1
。。。

原来是因为重新make时没有进行make clean造成,先进行make clean后再执行上述操作,问题解决。

[root@hadoop jengined-1.7.2]# make clean
[root@hadoop jengined-1.7.2]# make

(3)查找生成的so文件
[root@hadoop openssl-1.0.1e]# find . -name 'libssl.so*'
./libssl.so.1.0.0
./libssl.so
[root@hadoop openssl-1.0.1e]# find . -name 'libcrypto*'
./libcrypto.a
./libcrypto.pc
./libcrypto.so.1.0.0
./libcrypto.so
[root@hadoop openssl-1.0.1e]#

(4)生成软连接
复制文件到指定路径
[root@hadoop openssl-1.0.1e]# cp libcrypto.so.1.0.0 libssl.so.1.0.0 /usr/lib64/

创建软连接
[root@hadoop openssl-1.0.1e]# ln -s /usr/lib64/libcrypto.so.1.0.0 /usr/lib64/libcrypto.so.10
[root@hadoop openssl-1.0.1e]# ln -s /usr/lib64/libssl.so.1.0.0 /usr/lib64/libssl.so.10

检查一下,是否连接成功
[root@hadoop openssl-1.0.1e]# ll /usr/lib64/libcry*
lrwxrwxrwx. 1 root root      29 Aug 15 14:43 /usr/lib64/libcrypto.so.10 -> /usr/lib64/libcrypto.so.1.0.0
-rwxr-xr-x. 1 root root 2202868 Aug 15 14:37 /usr/lib64/libcrypto.so.1.0.0
lrwxrwxrwx. 1 root root      25 Mar  8  2016 /usr/lib64/libcrypt.so -> ../../lib64/libcrypt.so.1
[root@hadoop openssl-1.0.1e]# ll /usr/lib64/libssl*
-rwxr-xr-x. 1 root root 246584 Nov 24  2013 /usr/lib64/libssl3.so
lrwxrwxrwx. 1 root root     26 Aug 15 14:43 /usr/lib64/libssl.so.10 -> /usr/lib64/libssl.so.1.0.0
-rwxr-xr-x. 1 root root 477476 Aug 15 14:37 /usr/lib64/libssl.so.1.0.0
[root@hadoop openssl-1.0.1e]#

最后测试yum是否成功

[root@hadoop openssl-1.0.1e]# yum search openssl
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
==================================================== N/S Matched: openssl =====================================================
openssl-devel.i686 : Files for development of applications which will use OpenSSL
openssl-devel.x86_64 : Files for development of applications which will use OpenSSL
openssl-perl.x86_64 : Perl scripts provided with OpenSSL
openssl-static.x86_64 : Libraries for static linking of applications which will use OpenSSL
perl-Crypt-OpenSSL-Bignum.x86_64 : Perl interface to OpenSSL for Bignum
perl-Crypt-OpenSSL-RSA.x86_64 : Perl interface to OpenSSL for RSA
perl-Crypt-OpenSSL-Random.x86_64 : Perl interface to OpenSSL for Random
pyOpenSSL.x86_64 : Python wrapper module around the OpenSSL library
krb5-pkinit-openssl.x86_64 : The PKINIT module for Kerberos 5
m2crypto.x86_64 : Support for using OpenSSL in python scripts
nss_compat_ossl.i686 : Source-level compatibility library for OpenSSL to NSS porting
nss_compat_ossl.x86_64 : Source-level compatibility library for OpenSSL to NSS porting
openssl.i686 : A general purpose cryptography library with TLS implementation
openssl.x86_64 : A general purpose cryptography library with TLS implementation
openssl098e.i686 : A compatibility version of a general cryptography and TLS library
openssl098e.x86_64 : A compatibility version of a general cryptography and TLS library
perl-Crypt-SSLeay.x86_64 : Crypt::SSLeay - OpenSSL glue that provides LWP https support
perl-Net-SSLeay.x86_64 : Perl extension for using OpenSSL
qca-ossl.i686 : OpenSSL plugin for the Qt Cryptographic Architecture v2
qca-ossl.x86_64 : OpenSSL plugin for the Qt Cryptographic Architecture v2

  Name and summary matches only, use "search all" for everything.
[root@hadoop openssl-1.0.1e]#


至此,成功!!!
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics