在contos7中安装python3.8的时候,怎么都安装不起,一直报如下错误
[root@linux Python-3.9.6]# ./configure --prefix=/usr/local/python3
checking build system type… x86_64-pc-linux-gnu
checking host system type… x86_64-pc-linux-gnu
checking for python3.9… no
checking for python3… no
checking for python… python
checking for --enable-universalsdk… no
checking for --with-universal-archs… no
checking MACHDEP… “linux”
checking for gcc… no
checking for cc… no
checking for cl.exe… no
configure: error: in /tiankong/Python-3.9.6': configure: error: no acceptable C compiler found in $PATH See
config.log’ for more details
经过查询后得知是缺少GCC套件,安装gcc套件后解决
[root@linux Python-3.9.6]# yum install gcc
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
- base: mirrors.aliyun.com
- extras: mirrors.aliyun.com
- updates: mirrors.aliyun.com
…
安装完成后再次进行安装就成功了
[root@linux Python-3.9.6]# ./configure --prefix=/usr/local/python3
checking build system type… x86_64-pc-linux-gnu
checking host system type… x86_64-pc-linux-gnu
checking for python3.9… no
checking for python3… no
…