Python編譯安裝錯誤
今天心血來潮買了雲服務器體驗一把,主要是想有個環境可以學習和驗證自己對編程、系統和網絡的一些理解。
系統版本
CentOS release 6.3 (Final)
configure錯誤
碰到已下錯誤,很明顯沒GCC工具不在環境變量PATH裏面,可以看出雲服務器默認沒有安裝
[root@Sven Python-3.3.2]# ./configure --prefix=/usr/local/python33
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... linux
checking for --without-gcc... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/usr/local/src/Python-3.3.2':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
解決方案
yum安裝gcc,
yum install gcc -y
make錯誤
當我準備make 的時候發現這個也沒有,囧
[root@Sven Python-3.3.2]# make
-bash: make: command not found
果斷安裝make搞定
yum install make -y
結果
然後就沒有然後了,安裝好了,把新安裝的執行程序軟鏈到環境變量就可以用了:
ln -s /usr/local/python33/bin/python3 /usr/bin/python3