python - 为什么我在构建 python 时构建 sqlite3 失败?

标签 python sqlite python-2.7 python-extensions

为什么我构建 sqlite 失败了?

它与 readline 或 _tkinter 或其他什么有关吗?

pes/libffi/src/prep_cif.o build/temp.linux-i686-2.7/home/mirror/build/tmp/Python-2.7.3/Modules/_ctypes/libffi/src/closures.o build/temp.linux-i686-2.7/home/mirror/build/tmp/Python-2.7.3/Modules/_ctypes/libffi/src/dlmalloc.o build/temp.linux-i686-2.7/home/mirror/build/tmp/Python-2.7.3/Modules/_ctypes/libffi/src/x86/ffi.o build/temp.linux-i686-2.7/home/mirror/build/tmp/Python-2.7.3/Modules/_ctypes/libffi/src/x86/sysv.o -L/usr/local/lib -o build/lib.linux-i686-2.7/_ctypes.so

Python build finished, but the necessary bits to build these modules were not found:
_bsddb             _tkinter           bsddb185        
bz2                dbm                gdbm            
readline           sunaudiodev                        
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

Failed to build these modules:

_sqlite3

running build_scripts
creating build/scripts-2.7
copying and adjusting /home/mirror/build/tmp/Python-2.7.3/Tools/scripts/pydoc -> build/scripts-2.7
copying and adjusting /home/mirror/build/tmp/Python-2.7.3/Tools/scripts/idle -> build/scripts-2.7
copying and adjusting /home/mirror/build/tmp/Python-2.7.3/Tools/scripts/2to3 -> build/scripts-2.7
copying and adjusting /home/mirror/build/tmp/Python-2.7.3/Lib/smtpd.py -> build/scripts-2.7
changing mode of build/scripts-2.7/pydoc from 664 to 775
changing mode of build/scripts-2.7/idle from 664 to 775
changing mode of build/scripts-2.7/2to3 from 664 to 775
changing mode of build/scripts-2.7/smtpd.py from 664 to 775
/usr/bin/install -c -m 644 ./Tools/gdb/libpython.py python-gdb.py

更多详情:

Python build finished, but the necessary bits to build these modules were not found:
_bsddb             _tkinter           bsddb185
bz2                dbm                gdbm
sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name
Failed to build these modules:
_sqlite3 

我的系统是centos 5.3

最佳答案

可以在以下地址找到(并讨论)一个补丁: http://bugs.python.org/issue14572

我遇到了与原始发布者完全相同的问题,补丁解决了它。

申请patch ,从 python 2.7.3 目录中的终端:

curl -sk https://gist.github.com/msabramo/2727063/raw/59ea097a1f4c6f114c32f7743308a061698b17fd/gistfile1.diff | patch -p1

关于python - 为什么我在构建 python 时构建 sqlite3 失败?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12573787/

相关文章:

python - 如何使用适用于 x86_64 系统的精选 TensorFlow ops 构建 TensorFlow lite?

python - 如果未找到 Django REST Framework 的详细信息,如何修改 ModelViewSet 类中的错误响应?

sqlite - 如何最好地将应用程序从 sqlite(使用 fmdb)迁移到 CoreData?

python - 如何在 python 中打印 sqlite3 的输出

Python SQL 查询从关系数据库检索数据

python - 尝试访问列表元素时出现索引错误

android - 未调用 Loadmanager onLoadFinished

python - Django:没有名为设置的模块

python - 使用不同的轴类型绘制多个图

python-2.7 - 在 centos 6.4 上安装 numpy&scipy