最近在项目中使用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: