2012-09-24 63 views
5

爲什麼我只是沒有建立sqlite?爲什麼我在構建python時無法構建sqlite3?

它與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. 

無法建立這些模塊:

_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

+1

你已經安裝了SQLite的? –

+0

而且,既然這是Centos,sqlite3-dev以及sqlite3? – abarnert

+0

@ samy.vilar是的。 – hugemeow

回答

10

沒有可以在以下地址找到(並討論)補丁: http://bugs.python.org/issue14572

我有完全相同的問題,因爲原來的海報,和補丁解決它。

要應用patch,從終端在你的Python 2.7.3目錄:

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

這解決了這個問題。謝謝! – Phanto

+1

這是2016年,我仍然需要應用這個補丁。 – JohnMudd

相關問題