redhat编译安装python
一、升级相关依赖包
yum -y install wget gcc zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel
二、编译安装
1、解压安装文件,进入目录内,配置编译的路径:./configure --prefix=/opt/python/python-3.8.1
2、优化选项:./configure --enable-optimizations
3、编译:make
编译安装 make install
报错:could not import runpy module
---->
尝试:https://blog.csdn.net/whatday/article/details/103903955
./configure --enable-optimizations 去掉--enable-optimizations
不成功
--->
尝试升级gcc
Centos7 gcc版本默认4.8.3,Red Hat 为了软件的稳定和版本支持,yum 上版本也是4.8.3,所以无法使用yum进行软件更新,所以使用scl。记得联网。
https://www.cnblogs.com/dj0325/p/8481092.html
yum install centos-release-scl scl-utils-build
yum list all --enablerepo=‘centos-sclo-rh‘
同志们,前人说的是对的,不要升GCC了,还有更大的坑,./configure不成功的原因是之前文件需要全部删除,我也是突然拍脑门想到的,于是删除了所有文件重新解压,然后./configure,然后make && make install
终于OK了。
相关推荐
huavhuahua 2020-11-20
weiiron 2020-11-16
cakecc00 2020-11-15
千锋 2020-11-15
JakobHu 2020-11-14
guangcheng 2020-11-13
xirongxudlut 2020-11-10
solarLan 2020-11-09
pythonxuexi 2020-11-08
文山羊 2020-11-07
susmote 2020-11-07
wuShiJingZuo 2020-11-05
Pythonjeff远 2020-11-06
jacktangj 2020-11-04
lousir 2020-11-04
wanyi0 2020-11-03
Noneyes 2020-11-10
ailxxiaoli 2020-11-16
chensen 2020-11-14