首页 > 代码库 > error: command ‘gcc’ failed with exit status 1的解决方法

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


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