欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  科技

linux 2.6升级Python2.7 ./configure 报错问题

程序员文章站 2022-05-02 14:24:50
升级2.7.3使用命令./configure --prefix=/usr/local/python2.7.3时,出现以下错误:checking build system type... x86_64-unknown-linux-gnuchecking host system type... x86_ ......

升级2.7.3使用命令./configure --prefix=/usr/local/python2.7.3时,出现以下错误:
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for --enable-universalsdk... no
checking for --with-universal-archs... 32-bit
checking machdep... linux2
checking extraplatdir... 
checking for --without-gcc... no
checking for gcc... gcc
checking whether the c compiler works... yes
checking for c compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... configure: error: in `/data/python/python-2.7.3':
configure: error: cannot run c compiled programs.
if you meant to cross compile, use `--host'.

see `config.log' for more details

原因是未安装合适的解释器,解决办法如下:

sudo yum install gcc-c++

然后在重新执行

./configure
make
make instal

问题的解决也是我在网上找了很多帖子解决的,非原创,只是很难找,所有梳理了一下写给大家