Last Updated: February 25, 2016
· 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:

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
Say Thanks
Awesome Job

52ed8d62 26a6 11e8 8c72 b8886aea09d6
iOS (Swift) Software Engineer (EU)
Belgium, Brussels, Louvain-La-Neuve
Full Time