centos7 卸载 python2 之后 yum 不可用
时间: 2023-07-12 16:43:49 浏览: 42
934909504: found 24 primes in [30000080, 30000279]
Thread 123145942302208: found 24 primes in [30000140, 30000339]
Thread 123145934909504: found 25 primes in [30000060, 30000259]
Thread 123145942302208: found 24 primes in [30000020, 30000219在 CentOS 7 中,yum 和很多系统工具都是基于 Python 2.x 版本开发的,如果你]
Thread 123145934909504: found 24 primes in [30000110, 30000309]
Thread 123145942卸载了 Python 2.x 版本,那么会导致 yum 无法正常使用。为了解决这个302208: found 25 primes in [30000170, 30000369]
Thread 123145934909504: found 24问题,你需要重新安装 Python 2.x 版本或者升级到 Python 3.x 版本。
如果你想重新 primes in [30000050, 30000249]
Thread 123145942302208: found 24 primes in [30000120安装 Python 2.x 版本,可以使用以下命令:
```
sudo yum install python2
```
如果你想升, 30000319]
Thread 123145934909504: found 25 primes in [30000090, 30000289]
级到 Python 3.x 版本,可以使用以下命令:
```
sudo yum install python3
```
安装完成后Thread 123145942302208: found 24 primes in [30000030, 30000229]
Thread 123145934909,你需要将系统默认的 Python 版本切换到新安装的版本,可以使用以下命令:
```
sudo alternatives504: found 24 primes in [30000100, 30000299]
Thread 123145942302208: found 25 primes --config python
```
然后选择你要使用的 Python 版本即可。
另外,为了避免类似的 in [30000160, 30000359]
Thread 123145934909504: found 24 primes in [30000080,问题发生,建议不要轻易卸载系统自带的 Python 版本,可以通过安装其他版本的 Python 来 30000279]
Thread 123145942302208: found 24 primes in [30000140, 30000339]
Thread满足自己的需求。
相关推荐
















