升級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
問題的解決也是我在網上找了很多帖子解決的,非原創,只是很難找,所有梳理了一下寫給大家