【发布时间】:2020-07-11 22:26:08
【问题描述】:
python2 的官方支持几个月前结束了,但我需要它来运行我的一个程序,并且它已从 ubuntu 20.04 存储库中删除。所以我想自己编译和安装 python2。但在结束时make all(实际上在 setup.py build) 的各个阶段,它会打印以下错误:
Python build finished, but the necessary bits to build these modules were not found:
_bsddb _sqlite3 _ssl
_tkinter bsddb185 bz2
dbm dl gdbm
imageop readline sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
我不关心readline 或_tkinter 等模块,但我需要_ssl。无法通过pip 安装它。
我从存储库安装了libssl-dev,但是在重新构建之后出现了以下错误:
Failed to build these modules:
_hashlib _ssl
感谢任何帮助。
谢谢。
【问题讨论】:
-
我在 Ubuntu 18.0.4 下尝试从源代码编译 python 2.7.18 时遇到了完全相同的问题。有什么解决办法吗?
标签: linux compiler-errors python-2.x python-module