OS X Mountain Lion: gcc-4.2 No such file or directory

后端 未结 4 1045
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-08 04:34

Tried to install a gem on Mountain Lion and make couldn\'t find gcc-4.2:

kamil$ gem install posix-spawn -v \'0.3.6\'
Building native extensions.  This could          


        
4条回答
  •  独厮守ぢ
    2020-12-08 05:04

    If you have Xcode installed, gcc should be available. Check where it is with:

    kamil$ which gcc
    /usr/bin/gcc
    

    Then make a user-land symbolic link from gcc-4.2 to plain gcc:

    kamil$ sudo ln -s ~/bin/gcc /usr/bin/gcc-4.2
    

    (Ensure the user-land bind folder is in your path via export PATH=...:$HOME/bin in your .bash_profile or .zshrc.)

    Gem installed fine afterwards.

提交回复
热议问题