Python 3.4.3 无法在 Debian Stretch 中构建模块 _ssl 和 _hashlib

Python 3.4.3 无法在 Debian Stretch 中构建模块 _ssl 和 _hashlib

我尝试在我的 Debian 扩展中安装 python 3.4.3。我按照以下步骤操作:

cd /opt/
wget https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tgz
cd Python-3.4.3
./configure
make

我在编译时遇到了这个错误消息:

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_dbm                  _gdbm                 _lzma              
_tkinter                                                       
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


Failed to build these modules:
_hashlib              _ssl                                     

running build_scripts
creating build/scripts-3.4
copying and adjusting /opt/Python-3.4.3/Tools/scripts/pydoc3 -> build/scripts-3.4
copying and adjusting /opt/Python-3.4.3/Tools/scripts/idle3 -> build/scripts-3.4
copying and adjusting /opt/Python-3.4.3/Tools/scripts/2to3 -> build/scripts-3.4
copying and adjusting /opt/Python-3.4.3/Tools/scripts/pyvenv -> build/scripts-3.4
changing mode of build/scripts-3.4/pydoc3 from 644 to 755
changing mode of build/scripts-3.4/idle3 from 644 to 755
changing mode of build/scripts-3.4/2to3 from 644 to 755
changing mode of build/scripts-3.4/pyvenv from 644 to 755
renaming build/scripts-3.4/pydoc3 to build/scripts-3.4/pydoc3.4
renaming build/scripts-3.4/idle3 to build/scripts-3.4/idle3.4
renaming build/scripts-3.4/2to3 to build/scripts-3.4/2to3-3.4
renaming build/scripts-3.4/pyvenv to build/scripts-3.4/pyvenv-3.4
/usr/bin/install -c -m 644 ./Tools/gdb/libpython.py python-gdb.py
gcc -pthread -c -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes    -Werror=declaration-after-statement   -I. -IInclude -I./Include    -DPy_BUILD_CORE -o Modules/_testembed.o ./Modules/_testembed.c
gcc -pthread   -Xlinker -export-dynamic -o Modules/_testembed Modules/_testembed.o libpython3.4m.a -lpthread -ldl  -lutil   -lm  
# Substitution happens here, as the completely-expanded BINDIR
# is not available in configure
sed -e "s,@EXENAME@,/usr/local/bin/python3.4m," < ./Misc/python-config.in >python-config.py
# Replace makefile compat. variable references with shell script compat. ones;  -> 
sed -e 's,\$(\([A-Za-z0-9_]*\)),\$\{\1\},g' < Misc/python-config.sh >python-config
# On Darwin, always use the python version of the script, the shell
# version doesn't use the compiler customizations that are provided
# in python (_osx_support.py).
if test `uname -s` = Darwin; then \
    cp python-config.py python-config; \
fi

我应该怎么做才能克服这个问题?

相关内容