error: command ‘gcc’ failed with exit status 1的解決方法

源碼安裝完sqlite3,再安裝pysqlite-2.6.3.tar.gz出現error: command 'gcc' failed with exit status 1。安裝其他軟件時,這個錯誤出現的頻率也很高。通過修改源碼的.cfg文件問題可以解決,原因是cfg文件裏的路徑默認設置在/usr/local下,所以把cfg文件裏的/usr/local路徑改成包的路徑就ok啦。或者把安裝包放到/usr/local下也行。


vim setup.cfg:

[build_ext]
#define=
include_dirs=/sqlite/include(默認爲/usr/local/include,/usr/local修改爲sqlite3的安裝路徑/sqlite)
library_dirs=/sqlite/lib    (默認爲/usr/local/lib)
libraries=sqlite3
define=SQLITE_OMIT_LOAD_EXTENSION


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章