GCC-4.2 error on Mac OSX Mountain Lion, unable to install mysql-python

后端 未结 4 1128
说谎
说谎 2020-12-25 09:04

I\'m having trouble building MySQLdb on Mac OSX Mountain Lion. After upgrading to OSX Mountain Lion from OSX Lion, I have downloaded and installed Xcode 4.4 also. Then, I we

4条回答
  •  星月不相逢
    2020-12-25 09:38

    I've had a similar problem while working with Ruby On Rails 3.2.7. I too had upgraded the system to Mountain Lion, installed Xcode 4.4.1 and downloaded the Command Line Tools.

    On the command line I got an error message saying it was impossible to find the file: /usr/bin/gcc-4.2 (I can't paste the precise output right now, I'm sorry).

    I did have a /usr/bin/gcc and its version was i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1

    I solved the problem by symlinking the file in the same directory and giving it the name the Ruby script was looking for:

    sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
    

    After that, everything worked fine.

提交回复
热议问题