One, download the installation package, and then upgrade the deployment
[Email protected] tmp]# tar zxvf python-2.7.3.tgz [[email protected] python-2.7.3]#./configure && Make && ; make install [[email protected] python-2.7.3]# which python/usr/local/bin/python[[email protected] python-2.7.3]# LN-SF /usr/local/bin/python/usr/bin/python[[email protected] python-2.7.3]# Python-vpython 2.7.3
Second, after processing the upgrade, the situation of Yum
Since the Python upgrade, see if the original Yum can still work
[[Email protected] python-2.7.3]# yum clean allthere was a problem importing one of the python modulesrequired to run yum. the error leading to this problem was: no module named yumplease install a package which provides this module, orverify that the module is installed correctly. It ' S POSSIBLE THAT THE ABOVE MODULE DOESN ' t match thecurrent version of python, which is:2.7.3 (default, dec 17 2013, 17:33:06 ) [GCC 4.1.2 20080704 (red hat 4.1.2-54)]if you cannot solve this problem yourself, please go to the yum faq at: http://wiki.linux.duke.edu/yumfaq
Third, modify the Yum configuration file
[[email protected] python-2.7.3]# Vim/usr/bin/yum change "#!/usr/bin/python" to "#!/usr/bin/python2.4" [[Email protected] python-2.7.3]# Yum Clean allloaded plugins:product-id, security, subscription-managerthis system isn't registered to Red Hat Subscription Management. You can use the Subscription-manager to register. Cleaning up everything
This article is from the "Frozen vs watermelon" blog, so be sure to keep this source http://molewan.blog.51cto.com/287340/1703119
Python Upgrade (2.4 upgrade to 2.7.3)