Python:修订间差异
跳到导航
跳到搜索
(创建页面,内容为“===环境=== Python 从 3.11 之后,采用了 SSL 的加密方式,需要依赖 openssl-1.1.1。--enable-optimization 优化选项,需要依赖 gcc 9 以上版本。 ====安装依赖包==== # yum update -y yum install -y git make cmake htop gcc gcc-c++ kernel-devel bzip2 mlocate sqlite-devel zlib zlib-devel libffi-devel openssl-devel libcurl-devel chrony wget dmidecode net-tools openssh-server openssh-client perl-CPAN perl-IPC-Cmd # 安装 bzip2-deve…”) |
(→安装依赖包) |
||
第4行: | 第4行: | ||
====安装依赖包==== | ====安装依赖包==== | ||
# yum update -y | # yum update -y | ||
yum install -y git make cmake htop gcc gcc-c++ kernel-devel bzip2 mlocate sqlite-devel zlib zlib-devel libffi-devel openssl-devel libcurl-devel chrony wget dmidecode net-tools openssh-server openssh-client perl-CPAN perl-IPC-Cmd | yum install -y git make cmake htop gcc gcc-c++ kernel-devel bzip2 bzip2-devel mlocate sqlite-devel zlib zlib-devel libffi-devel openssl-devel libcurl-devel chrony wget dmidecode net-tools openssh-server openssh-client perl-CPAN perl-IPC-Cmd | ||
- OR - | |||
yum install -y | yum -y groupinstall "Development tools" | ||
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel | |||
yum install libffi-devel -y | |||
====openssl==== | ====openssl==== |
2023年12月28日 (四) 13:43的版本
环境
Python 从 3.11 之后,采用了 SSL 的加密方式,需要依赖 openssl-1.1.1。--enable-optimization 优化选项,需要依赖 gcc 9 以上版本。
安装依赖包
# yum update -y yum install -y git make cmake htop gcc gcc-c++ kernel-devel bzip2 bzip2-devel mlocate sqlite-devel zlib zlib-devel libffi-devel openssl-devel libcurl-devel chrony wget dmidecode net-tools openssh-server openssh-client perl-CPAN perl-IPC-Cmd - OR - yum -y groupinstall "Development tools" yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel yum install libffi-devel -y
openssl
curl https://www.openssl.org/source/openssl-3.0.12.tar.gz -O openssl-3.0.12.tar.gz ./config --prefix=/opt/openssl make && make install ln -sf /opt/openssl/bin/openssl /usr/bin/openssl echo "/opt/openssl/lib64/" >> /etc/ld.so.conf ldconfig -v openssl version
python
curl https://www.python.org/ftp/python/3.11.7/Python-3.11.7.tgz -O Python-3.11.7.tgz ./configure --with-openssl=/opt/openssl --with-openssl-rpath=auto make && make install # /usr/local/bin/python3