yumが動かなくなった

yumコマンドを打つと以下のエラー

# yum There was a problem importing one of the Python modules required to run yum. The error leading to this problem was:
No module named yum
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:
2.6.8 (unknown, Apr 12 2012, 20:59:00)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)]
If you cannot solve this problem yourself, please go to
the yum faq at:
 http://wiki.linux.duke.edu/YumFaq

Python のバージョンが問題なようで、yumの設定を変更しyumで使うPythonのバージョンを変更する

vi /usr/bin/yum
1行目
#!/usr/bin/python
 ↓
#!/usr/bin/python2.4
環境
#cat /etc/redhat-release
CentOS release 5.7 (Final)

コメント

タイトルとURLをコピーしました