Centos8 安装 python3方法

时间:2026-02-15 19:21:24

1、操作系统版本为最新的CentOS Linux release 8.1.1911

Centos8 安装 python3方法

2、获取源码包,速度有点尴尬啊,才5.87KB/s

Centos8 安装 python3方法

3、xz -d Python-3.8.2.tar.xz

解压成tar文件

Centos8 安装 python3方法

4、[root@localhost ~]# tar xf Python-3.8.2.tar 

-bash: tar: command not found

centos8最小化安装居然不带tar,和7完全不一样

Centos8 安装 python3方法

5、安装tar

yum install tar -y

Centos8 安装 python3方法

6、进入目录后进行编译,报错gcc未安装

./configure --prefix=/usr/local/python3.8.2

Centos8 安装 python3方法

7、yum install gcc -y

安装完gcc继续编译

Centos8 安装 python3方法

8、./configure --prefix=/usr/local/python3.8.2

make && make install

最小化安装连make都没有,采用yum进行安装

yum install make

Centos8 安装 python3方法

9、安装成功了

Centos8 安装 python3方法

© 2026 途途旅游
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com