bash: gcc command not found

hi,

I keep on getting this error message. I have installed xcode 3.2
and it did not solve the problem.
please help asap.

Thanks

macbook pro 13", Mac OS X (10.6.5)

Posted on Nov 21, 2010 4:21 PM

Reply
11 replies

Jan 18, 2011 9:40 AM in response to harshmehta

I just fell on this forum, I have the same problem: I found gcc: it appears it has been moved during installation of developer tools to the location: /Developer/usr/bin, (from /usr/bin) so I tried to launch gcc by typing the whole path /Developer/usr/bin/gcc, with a source file.c. gcc works now this way, but the trouble is that it doesn't find the #include files, which have probably also been moved in some directory in /Developer/... I also tried by adding the line export PATH=$PATH:/Developer/usr/bin to the file ~/.profile. That cures the necessity to write the whole path for gcc, but not the not finding of the #include. By the way, working in C through Xcode works properly.

Jul 11, 2012 6:09 AM in response to Ron Pugh

What happens if you just try 'cc' instead of 'gcc'


Apple has switched over the the '/usr/bin/clang' compiler, which would explain XCode working fine.


While I have a /usr/bin/gcc, it is a symlink to /usr/bin/gcc -> llvm-gcc-4.2 (cc points to the same llvm-gcc-4.2), AND I do not know if this is from installing XCode recently or form my older versions of Mac OS X and XCode.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

bash: gcc command not found

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.