kuoruan / shell-scripts

Linux Shell Scripts
Apache License 2.0
1.18k stars 542 forks source link

work around on Ubuntu 18.04 #23

Closed welldeep closed 5 years ago

welldeep commented 5 years ago

easy_install removed in Ubuntu 18.04,so i modify the kcptun.sh replaced easy_install with pip and it work.

cat >&2 <<-EOF

未找到已安装的 easy_install 命令,

请先手动安装 python-setuptools

然后重新运行安装脚本。

EOF

exit 1

fi

   if ! command_exists pip; then
           cat >&2 <<-EOF
           未找到已安装的 pip 命令,
           请先手动安装 python-pip
           然后重新运行安装脚本。            
           EOF            
           exit 1                  
   fi                                                                     

if ! ( easy_install --help >/dev/null 2>&1 ); then

cat >&2 <<-EOF

检测到你的 easy_install 已损坏,

通常是由于你自己升级过 python 版本,

但是没有将 easy_install 链接到新的地址。

需要手动做一个软链接

* ln -s /usr/local/python2.7/bin/easy_install /usr/bin/easy_install

#

"/usr/local/python2.7" 应该为你新版本 python 的路径

EOF

exit 1

fi

#

(

set -x

easy_install -i https://pypi.python.org/simple/ -U supervisor

)

    if ! ( pip --help >/dev/null 2>&1 ); then
            cat >&2 <<-EOF
            检测到你的 pip 已损坏,
            请重新安装python-pip
            EOF
            exit 1
    fi

    (
            set -x
            pip install supervisor
    )