centos7安装Python3.7,执行./configure时报错,configure: error: no acceptable C compiler found in $PATH


执行./configure时报错,configure: error: no acceptable C compiler found in $PATH

在安装python3.7,配置编译路径时会遇到以下问题:

configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

查看得知没有找到合适的编译器。

可以使用下面的命令安装编译器,解决./configure时报错。

sudo yum install gcc-c++  # 使用sudo yum install gcc-c++时会自动安装/升级gcc及其他依赖的包

重新执行以下命令

./configure --prefix=/usr/local/python3
make
make install


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM