
【Tips】pyenv로 Python3계의 3.5.3 미만을 인스톨 하려고 했을 때에 발생하는 에러에 대처
문제: Python 설치 중 오류
입력
pyenv install 3.4.8
출력
Downloading Python-3.4.8.tar.xz...
-> https://www.python.org/ftp/python/3.4.8/Python-3.4.8.tar.xz
Installing Python-3.4.8...
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 18.04 using python-build 1.2.19-1-gece59ca8)
Inspect or clean up the working tree at /tmp/python-build.20201118000548.3700
Results logged to /tmp/python-build.20201118000548.3700.log
Last 10 log lines:
(cd /home/【ユーザ名】/.anyenv/envs/pyenv/versions/3.4.8/share/man/man1; ln -s python3.4.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 9.0.1 requires SSL/TLS
환경
pyenv install 3.4.8
Downloading Python-3.4.8.tar.xz...
-> https://www.python.org/ftp/python/3.4.8/Python-3.4.8.tar.xz
Installing Python-3.4.8...
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 18.04 using python-build 1.2.19-1-gece59ca8)
Inspect or clean up the working tree at /tmp/python-build.20201118000548.3700
Results logged to /tmp/python-build.20201118000548.3700.log
Last 10 log lines:
(cd /home/【ユーザ名】/.anyenv/envs/pyenv/versions/3.4.8/share/man/man1; ln -s python3.4.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 9.0.1 requires SSL/TLS
원인: OpenSSL의 대응 버전
Python3계의 3.5.2까지는 OpenSSL의 1.1에 미대응.
해결 방법: OpenSSL 다운그레이드
sudo apt install libssl1.0-dev
pyenv install 3.4.8
보충
1. 사후 처리
OpenSSL1.0을 설치하면 OpenSSL이 다운 그레이드됩니다.
파이썬 설치가 성공적으로 완료되면 다음을 실행하십시오.
sudo apt install libssl-dev
2. Ruby의 경우
Ruby에서도 2.4 미만으로 유사한 원인에 의한 에러가 발생한다.
자세한 내용은 여기 문서를 참조하십시오.
참고문헌
sudo apt install libssl1.0-dev
pyenv install 3.4.8
보충
1. 사후 처리
OpenSSL1.0을 설치하면 OpenSSL이 다운 그레이드됩니다.
파이썬 설치가 성공적으로 완료되면 다음을 실행하십시오.
sudo apt install libssl-dev
2. Ruby의 경우
Ruby에서도 2.4 미만으로 유사한 원인에 의한 에러가 발생한다.
자세한 내용은 여기 문서를 참조하십시오.
참고문헌
sudo apt install libssl-dev