How can I find out if I have gcc installed on my machine?
I am trying to run CodeRunner, but it isn't responding. I know you have to have gcc installed in order for it to work properly. I do have Xcode 4.0.2 installed (from what I've read, if Xcode is installed then you already have gcc).
05 Answers
- Type
gccat the Terminal prompt. If it says "command not found", you don't. Otherwise, you do. - If that fails, then install from your OSX CD.
You could just try to see if a gcc executable is present. Try:
ls /usr/bin/gcc* 5 You can use "locate gcc" to find all filenames with gcc in them.
Try any terminal command, like:
$ gcc --helpIf gcc isn't installed, you will often see a message with a "how to install it" note, complete with the package manager's command.
On Terminal type
gcc -vYou will get something like below
Using built-in specs. ......
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)This will show you version of GCC installed on your machine. If gcc is not installed then this command will not work as above
2