因为要在服务器上安装nodejs:结果一直报错,百度了一下才发现是gcc和python的版本过低,命令行代码如下:
wget http://ftp.gnu.org/gnu/gcc/gcc-6.1.0/gcc-6.1.0.tar.gz
tar -zvxf gcc-6.1.0.tar.gz --directory=/usr/local/
cd /usr/local/gcc-6.1.0
./contrib/download_prerequisites
mkdir build
cd build
../configure -enable-checking=release -enable-languages=c,c++ -disable-multilib
make
make install
python更新
#wget http://python.org/ftp/python/2.7.13/Python-2.7.13.tar.bz
#tar -xvf Python-2.7.3.tar.bz2
#cd Python-2.7.3
#./configure
#make all
#make install
#make clean
#make distclean
#/usr/local/bin/python2.7 -V
#mv /usr/bin/python /usr/bin/python2.6.6
#ln -s /usr/local/bin/python2.7 /usr/bin/python