2012-05-03 4 views
4

10.6からMac OS X 10.7に最近アップグレードしました。Mac OS Xでllvm-gccが見つかりませんLion:mysql-pythonをインストールできない

私はPython 2.7を使用することに決めました。

しかし、私はジャンゴを実行するためのMySQLdbモジュールをインストールしようとしているとき、それは失敗します。

$ sudo pip install MySQL-python 
Downloading/unpacking MySQL-python 
    […] 
    Running setup.py install for MySQL-python 
    building '_mysql' extension 
    llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/local/mysql/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.7-intel-2.7/_mysql.o -Os -g -fno-common -fno-strict-aliasing -arch x86_64 
    unable to execute llvm-gcc-4.2: No such file or directory 
    error: command 'llvm-gcc-4.2' failed with exit status 1 
    Complete output from command /usr/bin/python -c "import setuptools;__file__='~/Sites/gugsm/build/MySQL-python/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-AwMuqj-record/install-record.txt: 
    running install 

running build 

[…] 

building '_mysql' extension 

creating build/temp.macosx-10.7-intel-2.7 

llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/local/mysql/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.7-intel-2.7/_mysql.o -Os -g -fno-common -fno-strict-aliasing -arch x86_64 

unable to execute llvm-gcc-4.2: No such file or directory 

error: command 'llvm-gcc-4.2' failed with exit status 1 

---------------------------------------- 

理由は、私はもはやllvm-gccgccバイナリを持っているということではありません。

私はXCodeを3.somethingから4.3.2にアップグレードしようとしましたが、それは助けにはなりません。これは単純なアプリケーションとして提供され、/usr/binllvm-gccを入力しません。

私は間違っていますか?

答えて

14

Xcode 4.3のPreferencesメニューでDownloadsを選択し、Command Line Toolsをインストールします。シンボリックリンクを作る

+0

感謝を。ダウンロードしてインストールすると、問題が解決するかどうかがわかります。 – alexpirine

+0

もう一度、ありがとうございます。ただ問題を修正しました:) – alexpirine

+0

@Ned:ありがとう!私はこのAppleのナンセンスで私の髪を引っ張っていた、あなたは私の問題を解決しました:-) –

4

は私のために働いた:ヒントの

sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2 
関連する問題