The default Python version of Python is 2.4. If you're unlucky with Yum, Installpython26 to install the python2.6, although the installation of the time will not be a problem, but there will be no libpython2.6.so.1.0 this library, even if the installation of the python-libs is not used, which for many need dynamic loading Libpython program is not Of So you need to install through the source code.
1. Download the Python source code. Like 2.6.5 or 2.6.6.
2. After decompression configure:
./configure--prefix=/usr/local/python2.6--with-threads--ENABLE-SHARED--ENABLE-UNIVERSALSDK
The--prefix option indicates that the target is compiled into the/usr/local/python2.6 directory.
Attention:
A. If you use only the./configure command, the default is to compile a static. A and 32-bit dynamic library.
B. The last option is very important. If this option is not added, it will only compile 32-bit libraries.
3. Make &&make Install
When you execute Python, you are likely to report a mistake:
libpython2.6.so.1.0:
Cannotopen Shared object File:no such file or directory
This is because the compiled libpython2.6.so.1.0 is inside the/usr/local/python2.6/lib, can make a soft link to/usr/lib64, or just copy it to the past on the line.
Or you can do this:
echo '/usr/local/python2.6/lib ' >/etc/ld.so.conf.d/opt-python2.6.conf
Then execute
Ldconfig
Finally, you can verify that there are 64-bit Libpython by using the following command:
Ldconfig–p | grep python
See if there is any output similar to "libpython2.6.so.1.0 (libc6,x86-64) =>/usr/local/python2.6/lib/libpython2.6.so.1.0".