centeros7升级python2.5.7到python3.5.2

centos 7 python2.7.5升级到3.5.2

下载python3.5.2

wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz

安装

  • 解压:tar -zxvf Python-3.5.2.tgz
  • 进入解压目录: cd Python-3.5.2
  • 创建安装目录: mkdir /usr/local/python3.5.2
  • 编译: ./configure --prefix=/usr/local/python3.5.2
  • 安装: make && make install
  • 备份原有python:mv /usr/bin/python /usr/bin/python_2.7.5
  • 创建软连接:ln -s /usr/local/python3.5.2/bin/python3.5 /usr/bin/python

 执行上面命令报错:

     [root@root otp_src_R15B]# ./configure --prefix=/opt/erlang --with-ssl

Ignoring the --cache-file argument since it can cause the system to be erroneously configured
Disabling caching
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking for ld... ld
checking for GNU make... no
configure: error: GNU make is required!

执行以下命令:

         sudo yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel

猜你喜欢

转载自1028826685.iteye.com/blog/2404239