源码安装python
安装依赖
centos
1 | yum install @development zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel xz xz-devel libffi-devel findutils -y |
如果提示openssl版本低,解决办法
1 | wget --no-check-certificate https://www.openssl.org/source/openssl-1.1.1k.tar.gz |
ubuntu
1 | sudo apt-get install -y build-essential libncursesw5-dev libgdbm-dev libc6-dev \ |
编译安装
1 | sudo ./configure --prefix=/usr/local/python3.10.11 |