版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/IOIO_/article/details/85018556
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