coscmd安装后,常见的问题就是python版本的问题,要求使用python3.9和最新的pip。
# python -V
Python 3.9.0
# pip -V
pip 22.0.4 from /usr/local/python3/lib/python3.9/site-packages/pip (python 3.9)
# 安装python3.9
wget?https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tgz
tar -zxvf Python-3.9.0.tgz
./configure prefix=/usr/local/python3
make && make install
#备份原来的python
mv /usr/bin/python /usr/bin/python.bak
#添加python3.9软链接
ln -s /usr/local/python3/bin/python3.9 /usr/bin/python
# ll /usr/bin/python*
lrwxrwxrwx 1 root root 32 Mar 15 21:17 /usr/bin/python -> /usr/local/python3/bin/python3.9
lrwxrwxrwx 1 root root 9 Jan 8 2021 /usr/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 7144 Nov 17 2020 /usr/bin/python2.7
-rwxr-xr-x 1 root root 1835 Nov 17 2020 /usr/bin/python2.7-config
lrwxrwxrwx 1 root root 16 Jan 8 2021 /usr/bin/python2-config -> python2.7-config
lrwxrwxrwx 1 root root 9 Jan 8 2021 /usr/bin/python3 -> python3.6
-rwxr-xr-x 2 root root 11328 Nov 17 2020 /usr/bin/python3.6
-rwxr-xr-x 2 root root 11328 Nov 17 2020 /usr/bin/python3.6m
lrwxrwxrwx 1 root root 14 Jan 8 2021 /usr/bin/python-config -> python2-config
/usr/bin/python -> /usr/local/python3/bin/python3.9
如果输出这样就对了
# 接下来就按照腾讯的文档操作就行了
对象存储 COSCMD 工具 - 工具指南 - 文档中心 - 腾讯云
|