Development department needs to use python2.7, because the public network environment Python version is the system comes with, the version is 2.6, need to upgrade, preferably through the RPM upgrade.
Linux systems: CentOS
CentOS 6.4 Upgrade Python after Yum unavailable solution http://www.linuxidc.com/Linux/2013-05/84727.htm
Implementation steps:
1. Download the release file for Nux
wget http://li.nux.ro/download/nux/dextop/el6/i386/nux-dextop-release-0-2.el6.nux.noarch.rpm
RPM-IVH nux-dextop-release-0-2.el6.nux.noarch.rpm
Yum-y Install Python27
Yum-y Install Python27-devel
2, upgrade Python
CentOS uses python2.6.* by default and requires python2.7 files to overwrite python files.
cd/usr/bin/
RM-RF python
CP python2.7 Python
3, test
Enter the Python--version on the command line, if the output shows the result is correct:
[email protected] script]# python--version
Python 2.7.3
4, since Yum does not have compatible python2.7, the following red parts need to be modified from #!/usr/bin/python to #!/usr/bin/python2.6.
Vi/usr/bin/yum, put the red part below.
#!/usr/bin/python
Modified to:
#!/usr/bin/python2.6
5. Configure IBUs
Use VI to open the following two files, find the exec Python line, the exec python changed to exec python2.6 save, exit. The IBUs is back to normal after a reboot! Are you happy?
- #vi/usr/bin/ibus-setup
- #vi/USR/LIBEXEC/IBUS-UI-GTK
python2.6 Upgrade to 2.7