贸易做网站,产品设计优秀网站,大连网站推广怎么收费,谷歌推广外包1、OpenSSL
1.1 原因
[rootlocalhost ~]# openssl version
OpenSSL 1.0.2k-fips 26 Jan 2017
[rootlocalhost ~]#通过执行openssl version可知Linux系统已经安装了OpenSSL#xff0c;但该版本较低#xff1b;Python 3 要求 OpenSSL版本不能低于1.1.1#xff0c;否则安装P…1、OpenSSL
1.1 原因
[rootlocalhost ~]# openssl version
OpenSSL 1.0.2k-fips 26 Jan 2017
[rootlocalhost ~]#通过执行openssl version可知Linux系统已经安装了OpenSSL但该版本较低Python 3 要求 OpenSSL版本不能低于1.1.1否则安装Python3时提示如下信息
1.2 依赖
原因
①、下面下载的openssl-3.2.0.tar.gz和Python-3.10.9.tgz只是源码需要先编译才能安装所以需要安装gcc编译器
②、若不安装IPC::Cmd则在执行./config --prefix/usr/local/openssl-3.2.0时提示如下信息
Cant locate IPC/Cmd.pm in INC (INC contains: /opt/openssl-3.2.0/util/perl /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . /opt/openssl-3.2.0/external/perl/Text-Template-1.56/lib) ...安装
[rootlocalhost ~]# yum -y install gcc perl-IPC-Cmd1.3 安装
a、下载
浏览器访问https://www.openssl.org/source/下载所需版本这里下载3.2.0
b、上传
借助MobaXterm等工具将OpenSSL安装包上传至/opt目录
c、解压
将JDK压缩文件解压至/opt目录tar -xvf /opt/openssl-3.2.0.tar.gz -C /opt
d、删除
删除压缩文件rm -f /opt/openssl-3.2.0.tar.gz
e、安装
[rootlocalhost ~]# cd /opt/openssl-3.2.0
[rootlocalhost openssl-3.2.0]# ./config
[rootlocalhost openssl-3.2.0]# make make install提示
①、指令“make make install”执行完毕大概需要10分钟。
②、执行./config指令时可以通过–prefix 指定软件安装路径为了简化Python3.0安装过程这里忽略–prefix设置如果指定了该设置则需要额外执行指令设置OpenSSL路径才能进一步安装Python3.0。
f、动态链接库
原因
[rootlocalhost openssl-3.2.0]# openssl version
openssl: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory操作
[rootlocalhost openssl-3.2.0]# echo /usr/local/lib64 /etc/ld.so.conf.d/openssl.conf
[rootlocalhost openssl-3.2.0]# ldconfig说明ldconfig 命令用于在/lib、 /usr/lib 和 /etc/ld.so.conf 目录搜索可共享的动态链接库如 lib*.so*进而创建动态链接器ld.so 或 ld-linux.so所需的缓存文件。该文件默认为 /etc/ld.so.cache其保存了排好序的动态链接库名字列表。为了让动态链接库为系统所共享需运行ldconfig 命令更新动态链接库的缓存文件。
1.4 检查
[rootlocalhost openssl-3.2.0]# openssl version
OpenSSL 3.2.0 23 Nov 2023 (Library: OpenSSL 3.2.0 23 Nov 2023)
[rootlocalhost openssl-3.2.0]#2、Python
2.1 下载
通过https://www.python.org/ftp/python/下载Python安装包这里下载Python-3.10.9.tgz
2.2 上传
借助MobaXterm等工具将Python安装包上传至/opt目录
2.3 解压
将JDK压缩文件解压至/opt目录tar -xvf /opt/Python-3.10.9.tgz -C /opt
2.4 删除
删除压缩文件rm -f /opt/Python-3.10.9.tgz
2.5 依赖
原因
编译安装Python期间需要诸如ncurses-devel和sqlite-devel等环境否则提示如下信息
安装
# yum -y install ncurses-devel sqlite-devel readline-devel zlib-devel libffi-devel bzip2-devel tk-devel gdbm-devel xz-devel2.6 安装
# cd /opt/Python-3.10.9
# ./configure --prefix/usr/local/python-3.10.9/
# make make install说明指令“make make install”执行完毕大概需要3分钟。
2.7 环境
# tee /etc/profile EOF
export PATH/usr/local/python-3.10.9/bin:$PATH
EOF
# source /etc/profile2.8 检查
[rootlocalhost Python-3.10.9]# python3 -V
Python 3.10.9
[rootlocalhost Python-3.10.9]# pip3 install pymysql -i https://mirrors.aliyun.com/pypi/simple/
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting pymysqlDownloading https://mirrors.aliyun.com/pypi/packages/e5/30/20467e39523d0cfc2b6227902d3687a16364307260c75e6a1cb4422b0c62/PyMySQL-1.1.0-py3-none-any.whl (44 kB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 44.8/44.8 kB 298.5 kB/s eta 0:00:00
Installing collected packages: pymysql
Successfully installed pymysql-1.1.0
WARNING: Running pip as the root user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv[notice] A new release of pip available: 22.3.1 - 23.3.2
[notice] To update, run: pip3 install --upgrade pip
[rootlocalhost Python-3.10.9]#