0

I've got a big problem, I can't launch anything from the terminal, not python, not emacs (or aquamacs), not even 'which'.

I was using homebrew to try to install ffmpeg and was having difficulties so I decided to pay attention to the warning that always come up advising me to uninstall fink. I removed the sw directory from my root directory, which is what the fink website told me to do and was confirmed on many blogs and message boards after a quick google search.

And since then nothing has worked, I'm almost certain that this was the cause of the problem because after removing sw I immediately tried home brew again and it said 'brew: command not found'. I get the same warning with any and every program I try to launch.

I use Mac OS Lion on a 6 year old MacBook.

Any ideas?

EddyTheB
  • 3,100
  • 4
  • 23
  • 32

1 Answers1

1

You probably busted your PATH. You can use absolute paths to commands until you get it fixed. For example:

/bin/mv ~/.profile ~/.profile.bak
/bin/mv ~/.bash_profile ~/.bash_profile.bak

Then open a new Terminal window, where standard things should now work. and repair your profile script.

Ken Thomases
  • 88,520
  • 7
  • 116
  • 154
  • Awesome, thanks that's it, though I don't recall doing anything with my .bash_profile file, (at least now I know what it does!). One question though, how do I repair the file? I tried cp .bash_profile.bak .bash_profile but if I then quit terminal and restart the changes are not remembered. – EddyTheB Apr 29 '12 at 20:36
  • Well, the idea was for you to edit it and figure out how it is breaking your PATH and change it to not do that. Then you would move it back into place with `mv ~/.bash_profile.bak ~/.bash_profile` (or your `cp` command). I'm not sure why it would not work. – Ken Thomases Apr 29 '12 at 21:52
  • Ok, I found the problem. I'd forgotten that another Homebrew warning had told me to add it's path to the file, so I'd done that. I must have done it wrong though. Commenting out that line fixes the problem. Thanks. – EddyTheB Apr 30 '12 at 01:10