安裝OpenSSL
1. https://openssl-library.org/source/index.html 下載 OpenSSL source code (wget ...)
2. ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared (因為Python安裝時,只會吃ssl底下的目錄)
3.make; make test; sudo make install
4.echo "/usr/local/ssl/lib64" > /etc/ld.so.conf.d/openssl.conf
5.sudo ldconfig -v
sudo apt-get update
sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev git
安裝Python
1.(應該是需要這些)
sudo apt-get install libbz2-dev
sudo apt-get install libctypes-dev
sudo apt-get install libffi-dev
sudo apt-get install libncurses-dev
sudo apt install libgdbm-compat-dev
sudo apt-get install lzma
sudo apt-get install liblzma-dev
sudo apt-get install uuid-dev lzma-dev liblzma-dev
sudo apt-get install nis
sudo apt-get install libnsl2 libnss-nis
sudo apt-get install libncurses5-dev
sudo apt-get install libncurses-dev
sudo apt-get install libreadline-dev
sudo apt-get install nis
sudo apt-get install tk
sudo apt-get install tk-devel
sudo apt-get install tk*dev
sudo apt-get install nis
sudo apt-get install libnsl-dev libnsl2
sudo apt-get install libsqlite3-dev
sudo apt install libssl*dev
或者
2. ../configure --enable-optimizations
--with-openssl=/usr/local/ssl --with-ensurepip=install
--with-openssl-rpath=/usr/local/ssl/lib64/
3. vim configure
Change
OPENSSL_LDFLAGS=-L/usr/local/ssl/lib
To:
OPENSSL_LDFLAGS=-L/usr/local/ssl/lib64
4. make -j$(nproc) ; sudo make altinstall
沒有留言:
張貼留言