使用一键安装脚本:
wget --no-check-certificate https://github.com/kuoruan/shell-scripts/raw/master/kcptun/kcptun.sh
chmod +x ./kcptun.sh
./kcptun.sh
错误提示如下:
2022-05-14 13:05:17 (9.13 MB/s) - ‘kcptun-v20210922.tar.gz’ saved [5977233/5977233]
+ echo '2b39996bb12942f1a407723f1811b834ad9e625b kcptun-v20210922.tar.gz'
+ sha1sum -c
kcptun-v20210922.tar.gz: OK
+ tar -zxf kcptun-v20210922.tar.gz -C /usr/local/kcptun
+ sleep 3
+ wget -qO- --no-check-certificate https://bootstrap.pypa.io/get-pip.py
+ python
ERROR: This script does not work on Python 3.6 The minimum supported Python version is 3.7. Please use https://bootstrap.pypa.io/pip/3.6/get-pip.py instead.
未找到已安装的 pip 命令,请先手动安装 python-pip
本脚本自 v21 版开始使用 pip 来安装 Supervisior。
1. 对于 Debian 系的 Linux 系统,可以尝试使用:
sudo apt-get install -y python-pip 来进行安装
2. 对于 Redhat 系的 Linux 系统,可以尝试使用:
sudo yum install -y python-pip 来进行安装
* 如果提示未找到,可以先尝试安装:epel-release 扩展软件库
3. 如果以上方法都失败了,请使用以下命令来手动安装:
wget -qO- --no-check-certificate https://bootstrap.pypa.io/get-pip.py | python
* python 2.6 的用户请使用:
wget -qO- --no-check-certificate https://bootstrap.pypa.io/2.6/get-pip.py | python
4. pip 安装完毕之后,先运行一下更新命令:
pip install --upgrade pip
再检查一下 pip 的版本:
pip -V
我的是centos8,epel正常使用。但是使用:
yum install -y python-pip 命令确实安装不了
[root@iZj6cj44anqpmc0an0lmn1Z ~]# yum install -y python-pip
Repository extras is listed more than once in the configuration
Repository PowerTools is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/CentOS-epel.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Repository epel is listed more than once in the configuration
Last metadata expiration check: 0:24:19 ago on Sat 14 May 2022 01:08:22 PM CST.
No match for argument: python-pip
Error: Unable to find a match: python-pip
但是安装kcptun脚本又需要pip,pip在python3之后的版本在bin目录下是pip3,所以你找不到
[root@iZj6cj44anqpmc0an0lmn1Z ~]# cd /usr/local/bin/
[root@iZj6cj44anqpmc0an0lmn1Z bin]# ll
total 57344
lrwxrwxrwx 1 root root 8 May 14 13:03 2to3 -> 2to3-3.6
-rwxr-xr-x 1 root root 101 May 14 13:03 2to3-3.6
-rwxr-xr-x 1 root root 964 Sep 14 2020 chardetect
-rwxr-xr-x 1 root root 972 Sep 14 2020 cloud-id
-rwxr-xr-x 1 root root 976 Sep 14 2020 cloud-init
-rwxr-xr-x 1 root root 2108 Sep 14 2020 cloud-init-per
-rwxr-xr-x 1 root root 980 Sep 14 2020 easy_install
-rwxr-xr-x 1 root root 236 Sep 14 2020 easy_install-3.6
-rwxr-xr-x 1 root root 988 Sep 14 2020 easy_install-3.8
-rwxr-xr-x 1 root root 226 May 14 13:25 echo_supervisord_conf
lrwxrwxrwx 1 root root 7 May 14 13:03 idle3 -> idle3.6
-rwxr-xr-x 1 root root 99 May 14 13:03 idle3.6
-rwxr-xr-x 1 root root 1005 Sep 14 2020 jsondiff
-rwxr-xr-x 1 root root 3663 Sep 14 2020 jsonpatch
-rwxr-xr-x 1 root root 1839 Sep 14 2020 jsonpointer
-rwxr-xr-x 1 root root 973 Sep 14 2020 jsonschema
-rwxr-xr-x 1 root root 226 May 14 13:25 pidproxy
-rwxr-xr-x 1 root root 233 May 14 13:25 pip
-rwxr-xr-x 1 root root 233 May 14 13:25 pip3
-rwxr-xr-x 1 root root 233 May 14 13:25 pip3.6
lrwxrwxrwx 1 root root 8 May 14 13:03 pydoc3 -> pydoc3.6
-rwxr-xr-x 1 root root 84 May 14 13:03 pydoc3.6
lrwxrwxrwx 1 root root 9 May 14 13:03 python3 -> python3.6
-rwxr-xr-x 2 root root 14282216 May 14 13:03 python3.6
lrwxrwxrwx 1 root root 17 May 14 13:03 python3.6-config -> python3.6m-config
-rwxr-xr-x 2 root root 14282216 May 14 13:03 python3.6m
-rwxr-xr-x 1 root root 3117 May 14 13:03 python3.6m-config
lrwxrwxrwx 1 root root 16 May 14 13:03 python3-config -> python3.6-config
lrwxrwxrwx 1 root root 10 May 14 13:03 pyvenv -> pyvenv-3.6
-rwxr-xr-x 1 root root 441 May 14 13:03 pyvenv-3.6
-rwxr-xr-x 1 root root 231 May 14 13:25 supervisorctl
-rwxr-xr-x 1 root root 229 May 14 13:25 supervisord
-rwxr-xr-x 1 root root 12070912 May 12 20:19 v2ctl
-rwxr-xr-x 1 root root 17989632 May 12 20:19 v2ray
所以只需软链接映射就行
ln -s /usr/local/bin/pip3 /usr/bin/pip