Computer Science/Linux
[centos7] OpenSSL1.1.1 설치
yesbaby.
2022. 11. 2. 15:12
반응형
centos7에서 python 3.10 버전을 컴파일 할 때 openssl 1.1 이상의 라이브러리가 필요하다.
하지만 기본적으로 깔려있는 버전은 openssl 1.0 버전이다.
다음은 centos7에서 openSSL 1.1.1을 설치하고
pyenv에서 python3.10.x 버전 설치하는 방법을 정리했다.
에러메시지
Installing Python-3.10.7...
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 (CentOS Linux 7 using python-build 20180424)
해결 방법
yum install epel-release
yum install openssl11 openssl11-devel
설치 확인
$ openssl11 version
OpenSSL 1.1.1k FIPS 25 Mar 2021
centos7에서 파이썬 빌드시 open ssl 경로 지정 후 설치가 필요함
export CFLAGS="$(pkg-config --cflags openssl11)"
export LDFLAGS="$(pkg-config --libs openssl11)"
pyenv install 3.10.7
반응형