简体   繁体   中英

Unable to install Python 3.8.5 using pyenv

I'm trying to install Python 3.8.5 using pyenv on Centos 6 Docker image. I am getting the below error:

Downloading Python-3.6.12.tar.xz... -> https://www.python.org/ftp/python/3.6.12/Python-3.6.12.tar.xz Installing Python-3.6.12...

BUILD FAILED (CentOS release 6.10 (Final) using python-build 1.2.22-47-g4c302a0)

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

Last 10 log lines: checking if g++ static flag -static works... no checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking dynamic linker characteristics... (cached) GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking size of size_t... 8 checking for C compiler vendor... gcc -pthread -shared -L/root/.pyenv/versions/3.6.12/lib -L/root/.pyenv/versions/3.6.12/lib -L/root/.pyenv/versions/3.6.12/lib -I/root/.pyenv/versions/3.6.12/include build/temp.linux-x86_64-3.6/tmp/python-build.20210131203049.150/Python-3.6.12/Modules/pyexpat.o build/temp. linux-x86_64-3.6/tmp/python-build.20210131203049.150/Python-3.6.12/Modules/expat/xmlparse.o build/temp.linux-x86_64-3.6/tmp/python-build.20210131203049.150/Python-3.6.12/Modules/expat/xmlrole.o build/temp.linux-x86_64-3.6/tmp/python-build.20210131203049.150/Python-3.6.12/Modules/expat/xmltok.o -L/root/.pyenv/versions/3.6.12/lib -L/usr/local/lib -o build/lib.linux-x86_64-3.6/pyexpat.cpython-36m-x86_64-linux-gnu.so /bin/sh: line 9: 8442 Killed CC='gcc -pthread' LDSHARED='gcc -pthread -shared -L/root/.pyenv/versions/3.6.12/lib -L/root/.pyenv/versions/3.6.12/lib ' OPT='-DNDEBUG -g -fwrapv -O3 -Wall' _TCLTK_INCLUDES='' _TCLTK_LIBS=''./python -E./setup.py $quiet build make: *** [sharedmods] Error 137

Looks like you're missing a dep. Try this:

$ sudo yum install openssl-devel

If that's not enough, several other relevant deps are mentioned on https://joshspicer.com/python37-ssl-issue

Notice that merely having openssl installed is not sufficient.

You need the -devel form of the package. It contains essential ingredients, such as *.h header files, that are necessary for the build to succeed.


Use $ yum list installed to see what you have ATM. You might find eg yum list installed | grep -i openssl yum list installed | grep -i openssl convenient.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM