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
  • 6,170
  • 16
  • 53
  • 86

1 Answers1

16

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

To add to $PATH:

export PATH=/opt/local/bin:$PATH

sup2069
  • 9
  • 2
trojanfoe
  • 120,358
  • 21
  • 212
  • 242
  • 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