ubuntu 22.04 build python 3.x error: Missing the OpenSSL lib?

ubuntu 22.04 build python 3.x error: Missing the OpenSSL lib?

ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?

Please consult to the Wiki page to fix the problem.
https://github.com/pyenv/pyenv/wiki/Common-build-problems


BUILD FAILED (Ubuntu 22.04 using python-build 20180424)

Inspect or clean up the working tree at /tmp/python-build.20220629172729.3400406
Results logged to /tmp/python-build.20220629172729.3400406.log

首先确定自己已经安装或者build了openssl 1.1

  1. 使用自己下载编译的openssl库
LDFLAGS="-L/opt/openssl/lib -Wl,-rpath,/opt/openssl/lib" CONFIGURE_OPTS="--with-openssl=/opt/openssl --enable-optimizations" pyenv install 3.10.4
  1. 使用brew安装的openssl库
LDFLAGS="-Wl,-rpath,=$(brew --prefix openssl@1.1)/lib" CONFIGURE_OPTS="--with-openssl=$(brew --prefix openssl@1.1) --enable-optimizations" pyenv install 3.10.0

我的github pages: perfectnewer.gitub.io
我的gitee pages: perfectnewer.gitee.io

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值