一、原因

由于在编译mysql时,报ssl错误,于是想卸载openssl再重新安装

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

二、报错

此时再执行yum报错

[root@server- 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.: 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. (default, Oct , ::)
[GCC 4.8. (Red Hat 4.8.-)] 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- src]# rpm -ivh openssl-libs-1.0.2k-.el7_6..x86_64.rpm
准备中... ################################# [%]
软件包 openssl-libs-:1.0.2k-.el7_6..x86_64 已经安装

五、再执行yum openssl

[root@server- 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- src]# history|grep rpm
rpm -qa|grep mysql
wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-community-server-5.7.26-1.el7.x86_64.rpm
yum install rpm
wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-community-server-5.7.26-1.el7.x86_64.rpm
rm -rf mysql-community-server-5.7.-.el7.x86_64.rpm.
rm -rf mysql-community-server-5.7.-.el7.x86_64.rpm.
wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-community-client-5.7.26-1.el7.x86_64.rpm
rpm -e mariadb-libs-:5.5.-.el7_5.x86_64 --nodeps
rpm -ivh mysql-community-common-5.7.-.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.-.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.-.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.-.el7.x86_64.rpm
rpm -qa|grep openssl
rpm -e openssl-1.0.2k-.el7_6..x86_64
rpm -e openssl-1.0.2k-.el7_6..x86_64 --nodeps
rpm -e openssl-libs-1.0.2k-.el7_6..x86_64 --nodeps
rpm -e openssl-devel-1.0.2k-.el7_6..x86_64 --nodeps
rpm -qa|grep openssl
rpm -ivh openssl-libs-1.0.2k-.el7.x86_64.rpm --force
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
rm p-ivh openssl-libs-1.0.2k-.el7_6..x86_64.rpm
rpm -ivh openssl-libs-1.0.2k-.el7_6..x86_64.rpm
history|grep rpm
[root@server- src]# rpm -qa|grep openssl
openssl-libs-1.0.2k-.el7_6..x86_64
[root@server- src]# rpm -ivh openssl-libs-1.0.2k-.el7_6..x86_64.rpm
准备中... ################################# [%]
软件包 openssl-libs-:1.0.2k-.el7_6..x86_64 已经安装
[root@server- 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..2k-.el7_6. 将被 安装
--> 解决依赖关系完成 依赖关系解决 ===========================================================================================================
Package 架构 版本 源 大小
===========================================================================================================
正在安装:
openssl x86_64 :1.0.2k-.el7_6. updates k 事务概要
===========================================================================================================
安装 软件包 总下载量: k
安装大小: k
Is this ok [y/d/N]

恢复正常

linux误卸载openssl后的恢复的更多相关文章

  1. 卸载openssl后yum无法使用,ssh无法连接的解决办法

    一,安装nginx时,提示openssl版本问题,用yum update openssl 发现还是不行,于是rpm -e 卸载了openssl 此时,才发现yum不能用了,然后想上传个tar包时又出现 ...

  2. Linux下误删除后的恢复操作(ext3/ext4)

    Linux是作为一个多用户.多任务的操作系统,文件一旦被删除是难以恢复的.尽管删除命令只是在文件节点中作删除标记,并不真正清除文件内容,但是其他用户和一些有写盘动作的进程会很快覆盖这些数据.在日常工程 ...

  3. MySQL误操作删除后,怎么恢复数据?

    MySQL误操作删除后,怎么恢复数据?登陆查数据库mysql> select * from abc.stad;+----+-----------+| id | name |+----+----- ...

  4. was控制台误禁用后的恢复启用办法

    websphere是可以配置禁用控制台的,下面以was6.1.单profile.https控制台为例介绍在(误)禁用控制台后如何恢复启用控制台. 1. 禁用控制台 WCInboundAdmin--控制 ...

  5. linux环境变量设置错误后的恢复方法(转)

    原文: http://blog.csdn.net/hoholook/article/details/2793447 linux环境变量设置错误后的恢复方法 中国自学编程网收集整理  发布日期:2008 ...

  6. win7,ubuntu双系统——重装win7后如何恢复ubuntu引导

    磁盘分区——windows 7自带分区工具实现 磁盘分区——PQ硬盘分区魔术师 win7,ubuntu双系统的安装——正式安装 win7,ubuntu双系统的安装——卸载ubuntu 讲述了我的  w ...

  7. Linux内核卸载和禁止更新

    注意:对于可以用好几条命令实现的,第一条命令已经验证,其他的命令参考自网上,没有进行验证. 查看Linux系统内核的命令有下面几条 dpkg --get-selections | grep linux ...

  8. Linux配置完iptables后,重启失效的解决方案

    Linux配置完iptables后,重启失效的解决方案 因为只有root用户才可访问1024以下的端口,非root用户登陆是不能启用80端口的.web service 往往启动1024以上的端口,并通 ...

  9. Oracle误删除表数据后的恢复具体解释

    Oracle误删除表数据后的恢复具体解释 測试环境: SYSTEM:IBM AIX 5L                         Oracle Version:10gR2 1. undo_re ...

随机推荐

  1. leetcode-easy-string-242. Valid Anagram

    mycode   71.97% class Solution(object): def isAnagram(self, s, t): """ :type s: str : ...

  2. Linux高级调试与优化——Address Sanitizer

    Address Sanitizer ASAN最早可以追溯到 LLVM 的 sanitizers项目(https://github.com/google/sanitizers),这个项目包含了Addre ...

  3. java操作poi生成excel.xlsx(设置下拉框)下载本地和前端下载

    需求:导入excel表格,如果excel有错误,将错误的地方标红,在把数据以excel的形式写出,供用户下载解决方案:1.以实体类的方式接收excel并解析(创建两个集合一个接收正常的数据一个接收错误 ...

  4. 初学vue 在做项目时遇到的问题与解决办法(使用element组件)(二)

    表格每行里都有按钮 <el-table-column prop="option" label="操作" align="center" ...

  5. select框可编辑

    $(function(){ $("#select").editableSelect({ //$("#select")为select框id effects: 's ...

  6. Selenium 2自动化测试实战6(异常)

    一.异常 python用异常队形(exception object)来表示异常情况,遇到错误后,会引发异常.如果异常对象并未被处理和捕捉,则程序就会用所谓的回溯(Traceback,一种错误信息)来终 ...

  7. SVM的推导和理解

    主要记录了SVM思想的理解,关键环节的推导过程,主要是作为准备面试的需要. 1.准备知识-点到直线距离 点\(x_0\)到超平面(直线)\(w^Tx+b=0\)的距离,可通过如下公式计算: \[ d ...

  8. 《Python编程从0到1》笔记3——欧几里得算法

    本节以欧几里得算法(这是人类历史上最早记载的算法)为示例,向读者展示注释.文档字符串(docstring).变量.循环.递归.缩进以及函数定义等Python语法要素.    欧几里得算法:“在数学中, ...

  9. 【嵌入式开发】树莓派+官方摄像头模块+VLC串流实时输出网络视频流

    sudo apt-get update sudo apt-get install vlc sudo raspivid -o - -t 0 -w 640 -h 360 -fps 25|cvlc -vvv ...

  10. java中易错点

    1.A instanceof  B{这是没有好好利用java多态的表现} java中的二元操作符,测试A对象是否是B类的实例: 返回值:boolean类型 2.“==”与 “equals”的区别: = ...