linux 升級 python yum 源不能使用的辦法

6.yum是使用python寫的,升級新版本的python後會致使yum不可用,以下爲運行yum時的錯誤提示:python

There was a problem importing one of the Python modulesui

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

No module named yumspa

解決方法:import

查找yum文件,並編輯此py文件require

[root@TC-Boss ~]# which yummodule

/usr/bin/yum方法

[root@TC-Boss ~]# vi /usr/bin/yumim

yum

#!/usr/bin/python

改成:

whereis python出來的結果(老版本的python)

#!/usr/bin/python2.6

而後保存OK.

相關文章
相關標籤/搜索