-
How to Fix no acceptable C compiler found in $PATH on Mac OS X Lion
Posted on May 16th, 2012 22 commentsIf you have a need to compile Memcache or wget on Mac OS X Lion and are wondering why you are getting the error
no acceptable C compiler found in $PATH
on Mac OS X Lion, you’re not alone.
Thanks to this post, I was able to fix my problem. Here are the steps.
- Run App Store
- Search for Xcode – it’s a free install from Apple
- Wait for awhile. Took 30min to download for me on a 20mbps connection
- Authenticate and let Xcode install. Once Xcode is installed you may be thinking you’re done. You would be wrong!
- Launch Xcode and run the mobile toolkit update (you can’t skip it, deal with it)
- Go to Xcode Preferences or press ⌘, (Command-comma)
- Click the Downloads tab -> Components list as shown below

- On the last row of the available downloads are the Command Line tools. Install them.
You should be good to go after that!
22 responses to “How to Fix no acceptable C compiler found in $PATH on Mac OS X Lion”

-
Thanks, that was spot on. I had thought I was done!
-
Very helpful! A pain to install, but did the trick. Thanks!
-
Thanks for the tip
-
Thanks phpguru! Problem solved.
-
Thanks a heap. JewelryBox would not let me install any Ruby versions. Using the terminal was giving me errors e.g. “For Ruby 1.9.3: Install libksba”. But your soluton to install Command Line Tools via xCode did the trick.
-
Thanks! Exactly what I needed. I was going through a lot of threads just to read over and over again I had to install x code. This was the only resource showing the extra needed steps for lion.
-
Thanks, good tutorial!!!
-
Thanks! Been scouring the internet for this info, you saved me a lot of time.
-
Michael October 8th, 2012 at 15:54
Thanks a ton. Who would have thought that x-code would ship without command line tools? iOS simulators not shipping with, I get. But command line tools?!
-
30 min searching on the web. This is the only one solving the problem. Thanks a lot!!
-
FirstTimeMacUser October 13th, 2012 at 15:23
GREAT!!! Thanks for your help!
-
chrisma October 18th, 2012 at 08:31
thanks alot! it’s very usefull!
-
This did the trick, thanks!
-
Thank you very much…!!!
-
Naveko November 24th, 2012 at 02:17
Works for Mountain Lion, too! Thanks for the useful post!
-
Thanks much for posting this. Why doesn’t Apple make it easier to enable the development stuff you need. Seems like we shouldn’t have t search the internet to add a simple extension to the OS!
-
Nice. Worked with Mountain Lion. I was having problems installing ruby 1.9.3 using rvm and couldn’t install the gem bcrypt-ruby.
Your steps solved the problem. Thanks. Adding the install error hoping that other rubyists that encounter the problem will google your suggestion.
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
creating Makefilemake
sh: make: command not foundGem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p194@rails-3.2.9/gems/bcrypt-ruby-3.0.1 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p194@rails-3.2.9/gems/bcrypt-ruby-3.0.1/ext/mri/gem_make.out -
Ciro80 January 10th, 2013 at 14:05
Hi guys,
can anybody help me to “install mobile toolkit update”? I can’t find anything in Xcode with such a name…
Sorry for this basic question..
Tnx -
samuel January 16th, 2013 at 13:12
thx dude for your tutorial.
this is a direct link to download the latest version of command line tools -
And still working like a charm – thanks for the fix!!
-
Kudos to Matt for posting his response… That was EXACTLY the scenario I was stuck in!
-
You are my rescuer. Thanks alot
Leave a reply



Andrew June 28th, 2012 at 23:56