macPorts官网:https://trac.macports.org/
macPorts install wiki:
https://guide.macports.org/#installing.macports
先下载安装包,无脑next。
安装过程中可能卡住,应该是需要翻墙导致的。
此时,打开终端:
ps aux|grep -i macports |grep -i selfupdate
root 15101 0.0 0.1 4338560 24296 ?? S 11:57上午 0:01.23 /opt/local/libexec/macports/bin/tclsh8.5 /opt/local/bin/port -v selfupdate
sudo kill 15101
杀死这个selfupdate进程后,macports应该就可以安装成功。
然后设置环境变量:
# vi ~/.bash_profile
export PATH=$PATH:/opt/local/bin
export MANPATH=$MANPATH:/opt/local/share/man
export INFOPATH=$INFOPATH:/opt/local/share/info
查看是否安装成功:
port -v
MacPorts 2.5.4
Entering shell mode... ("help" for help, "quit" to quit)
[Users/***] >
网友评论