[root@zyl ~]# python -V
Python 2.6.6
[root@zylpython]#wgethttp://python.org/ftp/python/2.7.8/Python-2.7.8.tgz
root@zyl python]#tar xf Python-2.7.8.tgz
[root@zylpython]# cd /Python-2.7.8
[[email protected]]# ./configure --prefix=/usr/local/python27
[[email protected]]#make
[[email protected]]# make install
����2.7.8�汾��python�Ѿ���װ����ϵͳ�У����ǻ�û�����
�ٴβ鿴python�汾��������Ȼ��2.6.6�汾
[root@zyl ~]#python -V
Python 2.6.6
1.��ԭ����python�������python_old��ע�ⲻҪɾ����
[[email protected]]# mv /usr/bin/python /usr/bin/python_old
2.�����µ�python��������
[[email protected]]# ln -s /usr/local/python27/bin/python /usr/bin/
3. �ٲ鿴һ�°汾������ok
[root@zyl ~]#python -V
Python 2.7.8
���������Ѿ�������ʹ��python2.7.X
�������ǻ������һ������Ҫ���:������Ϊyum��ʹ�õ�python2.4�İ汾������,����Ҫ��һ�£�ǰ�������������python_old���������ó���
[root@zyl ~]# yum
There was aproblem importing one of the Python modules
required to runyum. The error leading to this problem was:
No module namedyum
Please install apackage which provides this module, or
verify that themodule is installed correctly.
It's possiblethat the above module doesn't match the
current versionof Python, which is:
Python 2.7.8(default, Dec 3 2014, 10:51:34)
[GCC 4.1.220080704 (Red Hat 4.1.2-55)] on linux2
If you cannotsolve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq
[[email protected]]# vim /usr/bin/yum
#!/usr/bin/python #�Ĵ˴�Ϊ2.6��λ��
[root@zyl ~]# vim/usr/bin/yum
#!/usr/bin/python2.6
[root@zyl~]# yum
Loaded plugins:fastestmirror
You need to givesome command
usage: yum [options]COMMAND
List of Commands:
check-update Check for available package updates
clean Remove cached data
deplist List a package's dependencies
downgrade downgrade a package
erase Remove a package or packages fromyour system
groupinfo Display details about a package group
groupinstall Install the packages in a group on yoursystem
grouplist List available package groups
groupremove Remove the packages in a group from yoursystem
help Display a helpful usage message
info Display details about a package orgroup of packages
install Install a package or packages on yoursystem
list List a package or groups of packages
localinstall Install a local RPM
yum ����ʹ�ã�python��ɹ���
���ij��� ��zhangyiling�� ���ͣ�ת������������ϵ��