yum執行報錯No module named yummain處理
1:解決方式
1獲取yummain的安裝的py文件
[root@iZ2zeilmai38op3fw0apl7Z ~]# wget http://yum.baseurl.org/download/3.4/yum-3.4.0.tar.gz
[root@iZ2zeilmai38op3fw0apl7Z ~]# tar xf yum-3.4.0.tar.gz
[root@iZ2zeilmai38op3fw0apl7Z ~]# cd yum-3.4.0
[root@iZ2zeilmai38op3fw0apl7Z 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
[root@iZ2zeilmai38op3fw0apl7Z 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命令即可
[root@iZ2zeilmai38op3fw0apl7Z yum-3.4.0]# yum update
3:你的yum現在可以使用了
[root@iZ2zeilmai38op3fw0apl7Z 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處理