linux誤卸載openssl后的恢復


一、原因

由於在編譯mysql時,報ssl錯誤,於是想卸載openssl再重新安裝

rpm -qa|grep openssl
rpm -e openssl-1.0.2k-16.el7_6.1.x86_64
rpm -e openssl-1.0.2k-16.el7_6.1.x86_64 --nodeps
rpm -e openssl-libs-1.0.2k-16.el7_6.1.x86_64 --nodeps
rpm -e openssl-devel-1.0.2k-16.el7_6.1.x86_64 --nodeps

二、報錯

此時再執行yum報錯

[root@server-1 lib64]# yum install openssl
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   libcrypto.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.7.5 (default, Oct 30 2018, 23:45:53) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]

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

系統找不到ssl庫,所以不能使用命令,不能yum只能rpm本地安裝

三、 下載openssl-libs-1.0.2k-12.el7.x86_64.rpm包

下載地址:http://rpmfind.net/linux/centos/7.6.1810/updates/x86_64/Packages/openssl-libs-1.0.2k-16.el7_6.1.x86_64.rpm

先下載到本地電腦,通過rz上傳到服務器

四、安裝

[root@server-1 src]# rpm -ivh openssl-libs-1.0.2k-16.el7_6.1.x86_64.rpm 
准備中...                          ################################# [100%]
        軟件包 openssl-libs-1:1.0.2k-16.el7_6.1.x86_64 已經安裝

五、再執行yum openssl

[root@server-1 src]# yum search openssl
已加載插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.bit.edu.cn
 * extras: mirror.bit.edu.cn
 * updates: mirror.bit.edu.cn
========================================== N/S matched: openssl ===========================================
apr-util-openssl.x86_64 : APR utility library OpenSSL crytpo support
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.i686 : Libraries for static linking of applications which will use 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
pyOpenSSL-doc.noarch : Documentation for pyOpenSSL
xmlsec1-openssl.i686 : OpenSSL crypto plugin for XML Security Library
xmlsec1-openssl.x86_64 : OpenSSL crypto plugin for XML Security Library
xmlsec1-openssl-devel.i686 : OpenSSL crypto plugin for XML Security Library
xmlsec1-openssl-devel.x86_64 : OpenSSL crypto plugin for XML Security Library
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.x86_64 : Utilities from the general purpose cryptography library with TLS implementation
openssl-libs.i686 : A general purpose cryptography library with TLS implementation
openssl-libs.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

  名稱和簡介匹配 only,使用“search all”試試。
[root@server-1 src]# history|grep rpm
   30  rpm -qa|grep mysql
   45  wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-community-server-5.7.26-1.el7.x86_64.rpm
   46  yum install rpm
   61  wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-community-server-5.7.26-1.el7.x86_64.rpm
   64  rm -rf mysql-community-server-5.7.26-1.el7.x86_64.rpm.1
   65  rm -rf mysql-community-server-5.7.26-1.el7.x86_64.rpm.2
   67  wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-community-client-5.7.26-1.el7.x86_64.rpm
   70  rpm -e mariadb-libs-1:5.5.60-1.el7_5.x86_64 --nodeps
   71  rpm -ivh mysql-community-common-5.7.26-1.el7.x86_64.rpm
   72  rpm -ivh mysql-community-libs-5.7.26-1.el7.x86_64.rpm 
   73  rpm -ivh mysql-community-client-5.7.26-1.el7.x86_64.rpm 
   74  rpm -ivh mysql-community-server-5.7.26-1.el7.x86_64.rpm 
  738  rpm -qa|grep openssl
  739  rpm -e openssl-1.0.2k-16.el7_6.1.x86_64
  740  rpm -e openssl-1.0.2k-16.el7_6.1.x86_64 --nodeps
  741  rpm -e openssl-libs-1.0.2k-16.el7_6.1.x86_64 --nodeps
  742  rpm -e openssl-devel-1.0.2k-16.el7_6.1.x86_64 --nodeps
  743  rpm -qa|grep openssl
  791  rpm -ivh openssl-libs-1.0.2k-12.el7.x86_64.rpm --force
  792  wget http://rpmfind.net/linux/centos/7.6.1810/updates/x86_64/Packages/openssl-libs-1.0.2k-16.el7_6.1.x86_64.rpm
  795  rm p-ivh openssl-libs-1.0.2k-16.el7_6.1.x86_64.rpm 
  796  rpm -ivh openssl-libs-1.0.2k-16.el7_6.1.x86_64.rpm 
  799  history|grep rpm
[root@server-1 src]# rpm -qa|grep openssl
openssl-libs-1.0.2k-16.el7_6.1.x86_64
[root@server-1 src]# rpm -ivh openssl-libs-1.0.2k-16.el7_6.1.x86_64.rpm 
准備中...                          ################################# [100%]
        軟件包 openssl-libs-1:1.0.2k-16.el7_6.1.x86_64 已經安裝
[root@server-1 src]# yum install openssl
已加載插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.bit.edu.cn
 * extras: mirror.bit.edu.cn
 * updates: mirror.bit.edu.cn
正在解決依賴關系
--> 正在檢查事務
---> 軟件包 openssl.x86_64.1.1.0.2k-16.el7_6.1 將被 安裝
--> 解決依賴關系完成

依賴關系解決

===========================================================================================================
 Package               架構                 版本                               源                     大小
===========================================================================================================
正在安裝:
 openssl               x86_64               1:1.0.2k-16.el7_6.1                updates               493 k

事務概要
===========================================================================================================
安裝  1 軟件包

總下載量:493 k
安裝大小:814 k
Is this ok [y/d/N]

恢復正常

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM