例如,当前环境只有python3,你想使用python这个命令,而不想使用python3的话,那么我们可以生成一个软连接。 # alternatives --install /usr/bin/unversioned-python python /usr/bin/python3.9 2# alternatives --list | grep pythonpython auto /usr/bin/p
从属unversioned-python-man:/usr/share/man/man1/python3.9.1.gz 当前“最佳”版本是 /usr/libexec/no-python。 [lighthouse@VM-20-7-centos ~]$ update-alternatives --config python 配置python版本 [lighthouse@VM-20-7-centos ~]$ update-alternatives --config python 共有3 个提供“python”的程序。
# alternatives --install /usr/bin/unversioned-python python /usr/bin/python3.9 2 # alternatives --list | grep python python auto /usr/bin/python3 python3 manual /usr/bin/python3.9 1. 2. 3. 4. 注意,link的命令最好合乎规范,否则可能有告警信息: # alternatives --install /usr/bin/python py...