一.确定系统版本

# cat /etc/system-release
CentOS Linux release 7.9.2009 (Core)

 

# getconf LONG_BIT
64

二.通过rpm安装python

在http://mirrors.163.com/centos/7/os/x86_64/Packages/包下寻找对应rpm,依次安装以下python rpm文件

python
python-iniparse
python-pycurl
python-urlgrabber
python-devel
python-libs
python-setuptools
rpm-python

rpm -ivh --nodeps --force http://mirrors.163.com/centos/7/os/x86_64/Packages/python-2.7.5-89.el7.x86_64.rpm
........

  

三.安装yum
依次安装以下yum rpm,方法同上

yum
yum-metadata-parser
yum-utils
yum-plugin-fastestmirror
yum-plugin-protectbase
yum-plugin-aliases

安装完成后,yum应该就可以使用了.

 

其他问题:

使用firewall-cmd提示:No module named gi.repository,

安装python-gobject

yum install python-gobject

  

安装后还是提示No module named firewall.client

安装firewall.client

yum install python-firewall

  

相关文章:

  • 2022-12-23
  • 2021-07-12
  • 2022-02-20
  • 2021-12-26
  • 2021-07-20
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
猜你喜欢
  • 2021-05-22
  • 2021-07-02
  • 2022-12-23
  • 2022-12-23
  • 2021-04-11
  • 2021-08-23
相关资源
相似解决方案