[Python] fix error while loading shared libraries: libpython2.7.so.1.0

error log: /opt/rh/python27/root/usr/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory

check libpython2.7.so.1.0 exist?
find . -name 'libpython2.7.so.1.0'

if the file was exist: edit the ldconfig config
echo "/opt/rh/python27/root/usr/lib64" > /etc/ld.so.conf.d/python27.conf
ldconfig

if the file was not exist: install python27
(to install python2.7 in centos 6 , source: vcloudnine: Python 2.7 for CentOS 6)
yum install centos-release-SCL
yum install python27

This entry was posted in CentOS, Python. Bookmark the permalink.