centos7重新安装yum源头

在CentOS7系统中误删Python导致yum无法使用,通过修改#!/usr/bin/yum第一行未解决问题。接着尝试卸载并重新安装yum,但该方法无效。最终通过查询系统版本,下载对应rpm包,并逐个安装解决rpmpkgVerifySigs错误,恢复yum功能。
摘要由CSDN通过智能技术生成

最近在项目中使用yum安装其他软件,手贱无意间把python卸载,导致无法使用yum,尝试着安装python,按照网上教程配置#!/usr/bin/yum第一行#/usr/bin/python改为#!/usr/bin/python2.7或者改为#!/usr/bin/python3.6,然后并没有什么用。

继续参考网上教程全部卸载yum重新安装,类似下边安装流程,误导性太大, 并没有什么用处,随采用rpm方式安装

查询linux版本信息

cat /etc/redhat-release

Index of /centos/7/os/x86_64/Packages/页面查询对应的rpm文件信息

 

安装完成,尝试使用yum安装rz\sz命令

yum install -y lrzsz 报了下边错误

There was a problem importing one of the Python modules

required to run yum. The error leading to this problem was:

   /usr/lib64/python2.7/site-packages/rpm/_rpm.so: undefined symbol: rpmpkgVerifySigs

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:

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值