6

I am trying to install XFig and found this post. But when I tried to sudo port selfupdate I get the error sudo: port: command not found.

I am using zsh and tried to modify the path according to this in both .zshrc and .bash_profile but still no luck.

The current PATH in .zshrc file looks like this

export PATH="/Users/chintanshah/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

Community
  • 1
  • 1
chintan s
  • 5,662
  • 14
  • 44
  • 79

1 Answers1

14

You need /opt/local/bin in the $PATH.

trojanfoe
  • 118,129
  • 19
  • 204
  • 237
  • Thanks for your reply. so my new PATh is like this `export PATH=“/opt/local/bin:/Users/chintanshah/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"`, but when I restart the Terminal, I get a message like `/Users/chintanshah/.zshrc:84: unmatched "`. So, I removed `/opt/local/bin` and the error disappears. Also, when I just type `/opt/local/bin/port` it launches `port` – chintan s Mar 27 '16 at 09:45
  • You don't need any `"` characters at all. – trojanfoe Mar 27 '16 at 09:48
  • 4
    The command for this is `export PATH=/opt/local/bin:/opt/local/sbin:$PATH` – sonlexqt Dec 21 '16 at 22:42