1. 程式人生 > >Mac: install MacPorts

Mac: install MacPorts

Mac install MacPorts


1. Install Xcode and the Xcode Command Line Tools

2. Agree to Xcode license in Terminal

sudo xcodebuild -license

3. Install MacPorts for your version of the Mac operating system[pkg]

4. Configuration[Environment variable]

// add new line in .bash_profile
➜  ~ vi .bash_profile
export PATH=/opt/local/bin:/opt/local/sbin:$PATH

➜  ~ source .bash_profile

➜  ~ port
MacPorts 2.5.4
Entering shell mode... ("help" for help, "quit" to quit)
[Users/dijk] > exit
Goodbye
➜  ~ port version
Version: 2.5.4

https://www.macports.org/install.php
https://guide.macports.org/#installing.shell