当前位置:   article > 正文

银河麒麟V10SP3编译安装Python3.8_麒麟v10安装python3.8

麒麟v10安装python3.8

银河麒麟V10SP3编译安装Python3.8

[windcf@localhost ~]$ uname -a
Linux localhost.localdomain 4.19.90-52.22.v2207.ky10.x86_64 #1 SMP Tue Mar 14 12:19:10 CST 2023 x86_64 x86_64 x86_64 GNU/Linux
  • 1
  • 2

安装必要依赖

yum install wget zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel libffi-devel lzma-devel lzma gdbm-devel gdbm xz-devel gcc make -y
  • 1

更换openssl版本

编译安装3.8由于openssl版本(1.1.1f)问题,_ssl模块编译失败。需要修改openssl版本,以1.1.1g为例。

wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz
tar -xzvf openssl-1.1.1g.tar.gz
cd openssl-1.1.1g/
./config --prefix=/usr/local/openssl
make -j $nproc
sudo make install
make install
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

编译安装Python3.8

# openssl lib
export LD_LIBRARY_PATH=/usr/local/openssl/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
wget https://www.python.org/ftp/python/3.8.18/Python-3.8.18.tgz
tar -xzvf Python-3.8.18.tgz
cd Python-3.8.18
# 编译安装
./configure --prefix=/user/local/python3.8 --with-openssl=/usr/local/openssl --enable-optimizations
make -j$nproc
make altinstall
# 建立软链接
ln -s /usr/bin/python3.8 /usr/local/python3.8/bin/python3.8
ln -s /usr/bin/pip3.8 /usr/local/python3.8/bin/pip3.8
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号