'yum_reinstall'에 해당되는 글 1건

CentOS 6.x yum 에러 No module named yum



python 을 2.7 버전대로 yum update 가 아닌 컴파일 설치를 하게 되면 아래와 같은 에러가 발생하면서 yum 이 실행이 안됩니다.


이런 경우에는 해당 버전의 yum, python rpm 을 다운로드 받아서 재설치 해주면 됩니다.


버전 확인은 cat /etc/centos-release 으로 확인하면 됩니다.


# yum update

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.7.11 (default, May 13 2016, 18:00:58)

[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)]


If you cannot solve this problem yourself, please go to

the yum faq at:

  http://yum.baseurl.org/wiki/Faq



▶ 관련 rpm 다운로드


wget http://mirror.centos.org/centos-6/6/os/x86_64/Packages/yum-3.2.29-73.el6.centos.noarch.rpm

wget http://mirror.centos.org/centos-6/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

wget http://mirror.centos.org/centos-6/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm

wget http://mirror.centos.org/centos-6/6/os/x86_64/Packages/yum-plugin-security-1.1.30-37.el6.noarch.rpm

wget http://mirror.centos.org/centos-6/6/os/x86_64/Packages/yum-utils-1.1.30-37.el6.noarch.rpm

wget http://mirror.centos.org/centos-6/6/os/x86_64/Packages/python-2.6.6-64.el6.x86_64.rpm

wget http://mirror.centos.org/centos-6/6/os/x86_64/Packages/python-devel-2.6.6-64.el6.x86_64.rpm

wget http://mirror.centos.org/centos-6/6/os/x86_64/Packages/python-libs-2.6.6-64.el6.x86_64.rpm


위 파일은 64bit 용입니다.


▶ rpm 재설치


# rpm -e --nodeps yum

# rpm -e --nodeps python

# rpm -Uvh --nodeps *.rpm


이제 yum 을 실행해 보세요.


# yum

bash: /usr/bin/yum: No such file or directory


이렇게 에러가 나면 위에서 다운로드 받은 rpm 을 하나씩 다시 설치해주면 됩니다.


# rpm -Uvh --nodeps yum-3.2.29-73.el6.centos.noarch.rpm

# rpm -Uvh --nodeps python-2.6.6-64.el6.x86_64.rpm


우선 이 두가지만 먼저 재설치 해보세요.


블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,