Last Updated: February 25, 2016
·
5.277K
· hsanchez

Fix for “make: /usr/bin/gcc-4.2: No such file or directory”

When trying to install a gem after upgrading to Mountain Lion, installing Xcode 4.4.1, and then downloading the Command Line Tools, you may encounter the following error:

make
compiling autolink.c
make: /usr/bin/gcc-4.2: No such file or directory
make: *** [autolink.o] Error 1

To solve this problem, just symlink the file in the same directory and then give it the name that the gem install script is looking for:

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