首先用的centos的版本
[root@iZ28ujuc64uZ bin]# lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.6 (Final)
Release: 6.6
Codename: Final
然后把python从2.6.6升级到了2.7.8,装在了/usr/local/bin里面,改了PATH,把/usr/local/bin放在最前
[root@iZ28ujuc64uZ bin]# echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
[root@iZ28ujuc64uZ bin]# which python
/usr/local/bin/python
#我在/usr/local/bin里做了个软连接,好像软连接不起作用。。。。。
[root@iZ28ujuc64uZ bin]# cd /usr/local/bin
[root@iZ28ujuc64uZ bin]# ls -l
total 6140
-rwxr-xr-x 1 root root 101 Nov 30 13:15 2to3
-rwxr-xr-x 1 root root 329 Nov 30 13:29 easy_install
-rwxr-xr-x 1 root root 337 Nov 30 13:29 easy_install-2.7
-rwxr-xr-x 1 root root 99 Nov 30 13:15 idle
-rwxr-xr-x 1 root root 213 Nov 30 13:30 pip
-rwxr-xr-x 1 root root 213 Nov 30 13:30 pip2
-rwxr-xr-x 1 root root 213 Nov 30 13:30 pip2.7
-rwxr-xr-x 1 root root 84 Nov 30 13:15 pydoc
**lrwxrwxrwx 1 root root 9 Nov 30 13:26 python -> python2.7**
-rwxr-xr-x 1 root root 6221519 Nov 30 13:21 python2.7
-rwxr-xr-x 1 root root 1674 Nov 30 13:21 python2.7-config
-rwxr-xr-x 1 root root 18547 Nov 30 13:15 smtpd.py
-rwxr-xr-x 1 root root 220 Nov 30 13:39 virtualenv
-rwxr-xr-x 1 root root 220 Nov 30 13:39 virtualenv-2.7
执行的还是/usr/bin里的那个python
[root@iZ28ujuc64uZ bin]# cd /usr/bin
[root@iZ28ujuc64uZ bin]# ls -l py*
-rwxr-xr-x. 1 root root 78 Jan 22 2014 pydoc
**-rwxr-xr-x 2 root root 9032 Jan 22 2014 python**
lrwxrwxrwx. 1 root root 6 Aug 14 21:29 python2 -> python
-rwxr-xr-x 2 root root 9032 Jan 22 2014 python2.6
要怎么搞下?
软连接是不是不会被执行的啊必须是个文件才行?