pyenvでpython 3.5.1インストール時に"Missing the OpenSSL lib"でエラー
概要
pyenvでpython 3.5.1をインストールしようとしたらエラーが発生。
詳細
# pyenv install 3.5.1
Downloading Python-3.5.1.tgz...
-> https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz
Installing Python-3.5.1...
WARNING: The Python bz2 extension was not compiled. Missing the bzip2 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/yyuu/pyenv/wiki/Common-build-problems
BUILD FAILED (CentOS release 6.7 (Final) using python-build 20160509)
Inspect or clean up the working tree at /tmp/python-build.20160516110941.16104
Results logged to /tmp/python-build.20160516110941.16104.log
Last 10 log lines:
(cd /root/.pyenv/versions/3.5.1/share/man/man1; ln -s python3.5.1 python3.1)
if test "xupgrade" != "xno" ; then \
case upgrade in \
upgrade) ensurepip="--upgrade" ;; \
install|*) ensurepip="" ;; \
esac; \
./python -E -m ensurepip \
$ensurepip --root=/ ; \
fi
Ignoring ensurepip failure: pip 7.1.2 requires SSL/TLS
原因
OpenSSLのライブラリが入っていないため。
対処方法
# yum -y install openssl-devel