Using zsh and mcports. Command not found

5

1

I installed macports but I use zsh. What should I modify in the .zshrc file to get it to look for macports? I think macports is located in /opt/local/bin/port

William Falcon

Posted 2015-08-09T15:13:15.133

Reputation: 163

Answers

9

if you're using zsh and you installed using the package:

open ~/.zshrc

go to export PATH = ... under # User Configuration

add /opt/local/bin to the end of export PATH

restart terminal

type port version to see if it's installed

chungmoney

Posted 2015-08-09T15:13:15.133

Reputation: 99

You can also add the path to /etc/paths file in mac to store all paths instead of doing export PATH – Kishan B – 2016-11-30T11:05:26.930

2

Just add /opt/local/bin to the path. Shell guide gives details of editing path

e.g.

typeset -U path
path=(/opt/local/bin $path)

Note guide suggests ~/.zshenv as the correct startup file for this

user151019

Posted 2015-08-09T15:13:15.133

Reputation: 5 312

1

If port still isn't recognized after adding opt/local/bin and restarting your terminal, look in your .zshrc to see if the line specifying export PATH=... is commented out - by default, mine was.

Zac Collier

Posted 2015-08-09T15:13:15.133

Reputation: 11

Good suggestion, export PATH sure is the default. – Morgan Wilde – 2016-11-22T06:02:43.863