0
我跟着這個教程對我的雪Lepard與MySQL安裝Django: http://programmingzen.com/2007/12/22/how-to-install-django-with-mysql-on-mac-os-x/在雪地上安裝MySQLdb的豹
當我運行此命令:
python setup.py build
我得到了很多的錯誤,最後一個是:
error: command 'gcc-4.0' failed with exit status 1
這些是我執行命令行後得到的第一個行
running build
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.5-fat3-2.7/MySQLdb
running build_ext
building '_mysql' extension
gcc-4.0 -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch ppc -arch x86_64 -g -O2 -DNDEBUG -g -O3 -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/Applications/MAMP/Library/include/mysql -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.5-fat3-2.7/_mysql.o -fno-omit-frame-pointer -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL
_mysql.c:36:23: error: my_config.h: No such file or directory
_mysql.c:38:19: error: mysql.h: No such file or directory
_mysql.c:39:26: error: mysqld_error.h: No such file or directory
_mysql.c:40:20: error: errmsg.h: No such file or directory
_mysql.c:76: error: syntax error before ‘MYSQL’
_mysql.c:76: warning: no semicolon at end of struct or union
_mysql.c:79: error: syntax error before ‘}’ token
有人可以幫我解決這個問題嗎?
謝謝:-)
其他錯誤比最終錯誤更相關,可能從第一個錯誤開始,因爲'gcc-4.0'是有效的終端命令。 – philosodad 2010-10-25 02:31:38
你可以發佈其他錯誤嗎? – Chetan 2010-10-25 02:32:59
你好,我添加了第一行。謝謝 – bnabilos 2010-10-25 02:38:34