1.安装依赖环境
yum -y install wget gcc make zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel
2.安装libressl2.74
wget https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.7.4.tar.gz --no-check-certificate
tar zxvf libressl-2.7.4.tar.gz
cd libressl-2.7.4
./configure --prefix=/usr/local/libressl274
make
make install
在.bash_profile增加以下代码
export LDFLAGS="-L/usr/local/libressl274/lib"
export CPPFLAGS="-I/usr/local/libressl274/include -I/usr/local/libressl274/include/openssl"
export PKG_CONFIG_PATH=”/usr/local/libressl274/lib/pkgconfig”
export LD_LIBRARY_PATH="/usr/local/libressl274/lib:$LD_LIBRARY_PATH"
export PATH="/usr/ocal/python37/bin:$PATH"
然后source .bash_profile
在/etc/ld.so.conf.d 目录下新建一个文件libressl274.conf
内容为
/usr/local/libressl274/lib
保存后执行
ldconfig -v
3.下载python源码包
wget https://www.python.org/ftp/python/3.7.8/Python-3.7.8.tgz
4.编译安装python3.7
tar zxvf Python-3.7.8.tgz
cd Python-3.7.8
./configure prefix=/usr/ocal/python37
make
make install
本文档详细介绍了在Linux环境中手动安装LibreSSL 2.7.4和Python 3.7的过程,包括依赖库的安装、配置、编译和环境变量设置。首先通过yum安装必要的依赖,接着下载并编译LibreSSL,更新环境变量。然后下载Python 3.7源码,进行编译和安装。完成这些步骤后,系统将具备运行Python 3.7的能力。
2686

被折叠的 条评论
为什么被折叠?



