Skip to content

Commit 33691a2

Browse files
committed
kcptun: Ignore epel when install python-pip
Signed-off-by: kuoruan <[email protected]>
1 parent 2546ec9 commit 33691a2

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

kcptun/kcptun.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -781,10 +781,9 @@ install_deps() {
781781
fi
782782

783783
# CentOS 等红帽系操作系统的软件库中可能不包括 python-pip
784-
# 通常需要先安装 epel-release 扩展库
785-
# 先在这里尝试安装 python-pip
784+
# epel-release 扩展库中包含的 pip 有一些问题,默认不使用
786785
if ! command_exists pip; then
787-
( set -x; sleep 3; yum -y -q install python-pip || true )
786+
( set -x; sleep 3; yum -y -q --disablerepo=epel install python-pip || true )
788787
fi
789788

790789
# 如果 python-pip 安装失败,检测是否已安装 python 环境
@@ -903,16 +902,21 @@ install_supervisor() {
903902
904903
2. 对于 Redhat 系的 Linux 系统,可以尝试使用:
905904
sudo yum install -y python-pip 来进行安装
906-
* 注:如果提示未找到该软件,请先使用以下命令来安装扩展软件仓库:
907-
sudo yum install -y epel-release
908-
然后再次安装 python-pip
905+
* 注:由于 epel-release 库中的 python-pip 在 CentOS 6 下的更新有问题,
906+
故脚本会忽略该扩展库中的的 python-pip
909907
910908
3. 如果以上方法都失败了,请使用以下命令来手动安装:
911909
wget -qO- --no-check-certificate https://bootstrap.pypa.io/get-pip.py | python
912910
* python 2.6 的用户请使用:
913911
wget -qO- --no-check-certificate https://bootstrap.pypa.io/2.6/get-pip.py | python
914912
915-
pip 安装完毕之后,请重新运行安装脚本。
913+
4. pip 安装完毕之后,先运行一下更新命令:
914+
pip install --upgrade pip
915+
916+
再检查一下 pip 的版本:
917+
pip -V
918+
919+
一切无误后,请重新运行安装脚本。
916920
EOF
917921
exit 1
918922
fi

0 commit comments

Comments
 (0)