yum执行报错No module named yummain处理
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了yum执行报错No module named yummain处理相关的知识,希望对你有一定的参考价值。
今天上服务器上执行yum install htop出现 import yummain导入报错No module named yummain,于是百度查找问题处理方案,但是网上数说 执行yum clean all 即可 但是这个yum都不能执行了 clean 肯定也不行1:解决方式
1获取yummain的安装的py文件
[[email protected] ~]# wget http://yum.baseurl.org/download/3.4/yum-3.4.0.tar.gz
[[email protected] ~]# tar xf yum-3.4.0.tar.gz
[[email protected] ~]# cd yum-3.4.0
[[email protected] yum-3.4.0]# ls
AUTHORS cli.pyc INSTALL po test yumcommands.py
bin COPYING Makefile README TODO yumcommands.pyc
callback.py docs output.py rpmUtils utils.py yummain.py
ChangeLog etc output.pyc shell.py utils.pyc yum.spec
cli.py FAQ PLUGINS shell.pyc yum yum-updatesd.py
[[email protected] yum-3.4.0]# ./yummain.py install yum
base | 3.7 kB 00:00
base/primary_db | 4.5 MB 00:07
extras | 3.5 kB 00:00
extras/primary_db | 23 kB 00:03
出现以上提示就证明yum已经安装成功了。
2:执行yum命令即可
[[email protected] yum-3.4.0]# yum update
3:你的yum现在可以使用了
[[email protected] yum-3.4.0]# yum install -y htop
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package htop.x86_64 0:2.0.2-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
以上是关于yum执行报错No module named yummain处理的主要内容,如果未能解决你的问题,请参考以下文章
python的卸载方式和运行yum报错:No module named yum
CentOS6.5运行yum报错:No module named yum
Linux—运行yum报错:No module named yum
CentOS 6.* 运行yum报错:No module named rpm
Centos7 执行firewall-cmd报错“ModuleNotFoundError: No module named 'gi'”