安装Python2.7出现configure: error: no acceptable C compiler found in $PATH错误

安装Python2.7出现configure: error: no acceptable C compiler found in $PATH错误

安装步骤:
  • 安装依赖
yum groupinstall -y Development tools
yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
  • 安装Python2.7
wget https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tgz
tar xvf Python-2.7.11.tgz
cd Python-2.7.11
./configure --prefix=/usr/local
make && make install && echo OK
错误

由于没有gcc导致的,安装gcc即可解决:

yum install gcc
参考
posted @ 2017-10-23 17:56  wswang  阅读(13142)  评论(0编辑  收藏  举报