g++: command not found on terminal.app

Apr 22, 2009 at 1:14am
For a while I've been using Terminal to compile and work with c++ code in a first semester class at NCSU. The other day, something went wrong with the computer (there might have been a power surge). Now, I can't compile. Has anyone encountered anything like this? Do you know of a way to reinstall Terminal.app?

thanks
Apr 22, 2009 at 1:33am
Check that PATH is correct:
echo $PATH /usr/bin should be there (it may be a different directory, though GCC is always there, as far as I've seen).
Also check if g++ is in any of the directories listed.
If the computer shut down unexpectedly, the file system might have been damaged. Check it for consistency.
Apr 22, 2009 at 1:37am
Thanks. This is what I tried based on your advice:

wolfkv-g4-1:~ kenneth$ echo $PATH
-bash: echo: command not found
wolfkv-g4-1:~ kenneth$ [tt]/usr/bin

-bash: /usr/bin: No such file or directory
wolfkv-g4-1:~ kenneth$

Any advice?

Apr 22, 2009 at 1:45am
No.
cd /usr/bin

But if it can't find echo, looks to me like that installation may be hosed. Though I'm not really experienced with Linux. You should get better answers in a Linux forum.
Last edited on Apr 22, 2009 at 1:46am
Apr 22, 2009 at 4:34pm
try login from a different user.. and see if all is working well!!
Topic archived. No new replies allowed.