BUILD FAILED (CentOS Linux 7 using python-build 20180424)
Could not build the ssl module!
Python requires a OpenSSL 1.1.1 or newer
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
手动安装 openssl 1.1<大部分安装出错的原因都在这里>
检查版本:openssl version
下面的是解决方案
# 1. 下载 openssl
cd /tmp
wget https://www.openssl.org/source/openssl-1.1.1l.tar.gz
tar -zxf openssl-1.1.1l.tar.gz
# 2. 编译安装
cd openssl-1.1.1l
./config --prefix=/usr/local/openssl shared
make && make install
# 3. check 退出再登录即可
/usr/local/bin/openssl version
# 4. 如果找不到命令,则加入这个到 path 中
export PATH="/usr/local/openssl/bin:$PATH";
# 1. Check that pyenv is in your PATH:
which pyenv
# 2. Check that pyenv's shims directory is in your PATH:
echo $PATH | grep --color=auto "$(pyenv root)/shims"
Installing Python-3.10.0...
patching file aclocal.m4
patching file configure
Hunk #5 succeeded at 10537 (offset -15 lines).
patching file Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
patching file configure
patching file configure.ac
WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib?
WARNING: The Python curses extension was not compiled. Missing the ncurses lib?
WARNING: The Python ctypes extension was not compiled. Missing the libffi lib?
WARNING: The Python readline extension was not compiled. Missing the GNU readline 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 20.04 using python-build 20180424)
Inspect or clean up the working tree at /tmp/python-build.20220602193721.2061645
Results logged to /tmp/python-build.20220602193721.2061645.log
Last 10 log lines:
Installing collected packages: setuptools, pip
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /home/aric.zheng/.pyenv/versions/3.10.0/include/python3.10/setuptools
sysconfig: /tmp/python-build.20220602193721.2061645/Python-3.10.0/Include/setuptools
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /home/aric.zheng/.pyenv/versions/3.10.0/include/python3.10/pip
sysconfig: /tmp/python-build.20220602193721.2061645/Python-3.10.0/Include/pip
WARNING: The scripts pip3 and pip3.10 are installed in '/home/aric.zheng/.pyenv/versions/3.10.0/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-21.2.3 setuptools-57.4.0