When installing salt, you need to do this, the company has a group of REDHAT5, get up ...
And then it was:
Missing Dependency:python (ABI) = 2.6 is needed by package
Rpm-q--provides Python | grep Abi
Python (ABI) = 2.4
The process is smooth, refer to the URL:
Http://www.linuxidc.com/Linux/2012-02/55194.htm
A few days ago, when setting up a test environment on CentOS, we encountered the need to upgrade the Python version and recorded the entire upgrade process:
The Python version that comes with CentOS5 is 2.4, but many Python-based applications now require a Python version higher than 2.4. When upgrading the Python version, you must not uninstall Python 2.4, and then install python2.7, there will be endless trouble, the conservative way is to install the python2.7 source package directly, that is, Python two version coexistence. (because there are many programs in CentOS that rely on Python, it's best not to try to uninstall python2.4).
(1) Download/install Python
Download python2.7.2.tgz (# wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tgz)
- $tar JXVF python2.7.2.tgz
- $CD Python2.7.2
- $./configure
- $make && make Install
Since then, the python2.7 installation path defaults to the/usr/local/lib/python2.7
To view the Python version:
$/usr/local/bin/python2.7-v
(2) Establish a soft connection so that the system default Python points to python2.7
Under normal circumstances, even though the python2.7 installation succeeds, the system is pointing to a python that is still version 2.4, considering that Yum is based on the
python2.4 to work properly, not easy to uninstall. How do you point to the system default Python to version 2.7?
Mv/usr/bin/python/usr/bin/python.bak (or Rm-rf/usr/bin/python)
Ln-s/usr/local/bin/python2.7/usr/bin/python
Verify that the Python point is successful
Python-v
(3) Fix system python soft link to python2.7 version, Yum does not work properly
Method:
$vi/usr/bin/yum
The first line of text editing is displayed
#!/usr/bin/python modified to #!/usr/bin/python2.4, save the changes can be
CentOS 5 Upgrade Python version (2.4>2.7)