파이썬 버전 업데이트 이후에 yum이 다음 메시지와 함께 동작이 안되어서 재설치를 하였다.

yum-no-module-named-yum

centos 버전에 따라서 centos-VERSION 폴더에서

i386(32비트) / x86_64(64비트) 확인을 잘해서 package를 설치한다.

http://mirror.centos.org/centos-6/6/os/x86_64/Packages/


# rpm -e --nodeps yum
# rpm -e --nodeps python

# rpm -Uvh --nodeps --force http://mirror.centos.org/centos-6/6/os/x86_64/Packages/${RPM_FILE_NAME}

## RPM_FILE_NAMES

sudo rpm -Uvh --nodeps --force http://mirror.centos.org/centos-6/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm

sudo rpm -Uvh --nodeps --force http://mirror.centos.org/centos-6/6/os/x86_64/Packages/python-2.6.6-66.el6_8.x86_64.rpm

sudo rpm -Uvh --nodeps --force http://mirror.centos.org/centos-6/6/os/x86_64/Packages/python-devel-2.6.6-66.el6_8.x86_64.rpm

sudo rpm -Uvh --nodeps --force http://mirror.centos.org/centos-6/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm

sudo rpm -Uvh --nodeps --force http://mirror.centos.org/centos-6/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

sudo rpm -Uvh --nodeps --force http://mirror.centos.org/centos-6/6/os/x86_64/Packages/python-libs-2.6.6-66.el6_8.x86_64.rpm

yum list python 쳐보면 잘 동작한다.


- Reference

http://alloe.tistory.com/64

# 1. Install a package with repository for your system:
# On CentOS, install package centos-release-scl available in CentOS repository:
$ sudo yum install centos-release-scl

# On RHEL, enable RHSCL repository for you system:
$ sudo yum-config-manager --enable rhel-server-rhscl-7-rpms

# 2. Install the collection:
$ sudo yum install python27

# 3. Start using software collections:
$ scl enable python27 bash


- add source to the path

 cp /opt/rh/python27/root/usr/lib/python2.7 /usr/lib/python2.7

 cp /opt/rh/python27/root/usr/bin/python2.7 /usr/bin/

 cp /opt/rh/python27/root/usr/bin/python2.7-config /usr/bin/

 ln -snf /usr/bin/python2.7

 ln -snf /usr/bin/python2.7-config /usr/bin

 cp /opt/rh/python27/root/usr/lib64/libpython2.7.so /usr/lib64/

 cp /opt/rh/python27/root/usr/lib64/libpython2.7.so.1.0 /usr/lib64//usr/lib64/

 cp python27/root/usr/bin/pip2.7 /usr/bin/

 cp /opt/rh/python27/root/usr/bin/easy_install-2.7 /usr/bin/

 easy_install --upgrade pip


[ref]

https://github.com/h2oai/h2o-2/wiki/installing-python-2.7-on-centos-6.3.-follow-this-sequence-exactly-for-centos-machine-only

https://www.softwarecollections.org/en/scls/rhscl/python27/

'Programming > Python' 카테고리의 다른 글

pip 설치 및 재설치  (0) 2018.10.22
[python] 다양한 정규식 패턴 표현  (0) 2018.10.12
[argparse] FLAGS parser 사용법  (0) 2017.08.24
matplotlib.pyplot 설치하기  (0) 2017.08.24
사용자 입력 / 옵션으로 입력 받기  (0) 2017.08.14

+ Recent posts