2012-02-25 11 views
4

私はこれに対する解決策を探していましたが、多くの異なる解決策があるようですが、MySQL-python、エラー:コマンド 'gcc-4.2'が終了ステータス1で失敗しました

私はPythonでMySQLをセットアップしようとMySQL-Pythonを使用しています。私は

sudo python setup.py build 

を実行しようとする。しかし、私は次のエラーを取得する:

Password: 
running build 
running build_py 
copying MySQLdb/release.py -> build/lib.macosx-10.6-intel-2.7/MySQLdb 
running build_ext 
building '_mysql' extension 
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -g -O2 -DNDEBUG -g -O3 -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/local/mysql-5.5.21-osx10.6-x86/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.6-intel-2.7/_mysql.o -Os -g -fno-common -fno-strict-aliasing -arch i386 
In file included from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:4, 
      from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:85, 
      from pymemcompat.h:10, 
      from _mysql.c:29: 
/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory 
In file included from _mysql.c:36: 
/usr/local/mysql-5.5.21-osx10.6-x86/include/my_config.h:329:1: warning: "SIZEOF_SIZE_T" redefined 
In file included from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:9, 
      from pymemcompat.h:10, 
      from _mysql.c:29: 
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pymacconfig.h:56:1: warning: this is the location of the previous definition 
In file included from _mysql.c:36: 
/usr/local/mysql-5.5.21-osx10.6-x86/include/my_config.h:422:1: warning: "HAVE_WCSCOLL" redefined 
In file included from  /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:8, 
      from pymemcompat.h:10, 
      from _mysql.c:29: 
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pyconfig.h:887:1: warning: this is the location of the previous definition 
error: command 'gcc-4.2' failed with exit status 1 
+1

"さまざまな解決策がたくさんありますが、どれもうまくいかないようです"。具体的にしてください。何を試しましたか?何が起こった? –

+0

http://stackoverflow.com/questions/8473066/gcc-4-2-failed-with-exit-status-1、同じエラーが続いた – varatis

+0

http://justcramer.com/2007/11/05/mysqldb- on-leopard /、しかし、私は彼らが話していた行を見つけていないし、エラーはまったく同じではないようだ – varatis

答えて

1

私は同じ問題を抱えていました。数時間の苦労の末、ActivePython(http://code.activestate.com/pypm/mysql-python/)を使ってMySQL-pythonをインストールしました。あなたのエラーを正確に解決するわけではありませんが、それは全体の問題を解決します:)

+0

ありがとう。はい、私は一時的にSQLiteを一時的に使用してしまいましたが、別のものをインストールしなければならない時代の1つにすぎません。 – varatis

関連する問題