0

I tried to install omnet++ on my Macbook pro (OS 10.10) yesterday. I got an error so I delete path in my bash-profile.

Now, every command I try to run in my terminal shows an error of command not found. I try many ways but did not find a answer.

enter image description here

  • 1
    What explicitly and specifically do you mean by "I got an error so I delete path in my bash-profile"? Also from man path_helper: "The path_helper utility should not be invoked directly. It is intended only for use by the shell profile." – user3439894 Apr 25 '15 at 23:09
  • reset terminal back to the root directory. – Ruskes Apr 26 '15 at 3:07
  • 1
    this might help superuser.com/a/498356 – Ruskes Apr 26 '15 at 3:21
  • You've basically deleted the path, which means the shell cannot find commands in /usr/bin and other such locations (those are the locations that contain commands like tar, touch, and everything). @Buscar웃 's pointing to something that will indeed help. Add the path back into the .bashrc or .bash_profile, restart the shell, and that should be it. – Ambidextrous Apr 26 '15 at 3:50
1

First, get your PATH back for the current shell by running

PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
export PATH

Then fix the PATH problems

  • edit your bash-profile and put back the line you've deleted. If you don't remember, take the two lines from above
  • path_helper takes its input from the files in /etc/paths.d, at least one of those files seems to be corrupt (the last two entries in the output look kind of strange). To fix, run /bin/ls -l /etc/paths.d to get the name of the file containing the additions for omnet++ (should be named accordingly) and remove it with sudo /bin/rm /etc/paths.d/NAME-OF-FILE

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .