MacPort使用

Mac下使用MacPort安装软件,类似ubuntu下的apt-get一样,可以快速安装软件
安装:
官方网站下载最新版,然后安装。
使用:
安装完之后,打开终端,输入port,提示找不到port命令,是因为port命令没在path路径下,解决方法:
/opt/local/bin/opt/local/sbin添加到$PATH搜索路径中:
在/etc/profile或~/.bash_profile中添加如下语句:

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

【MacPort使用】然后,重新打开终端,再输入port,就可以使用了!!
以下为常用的命令:
更新ports tree和MacPorts版本:sudo port -v selfupdate
搜索索引中的软件:port search name
安装新软件:port install name
卸载软件:sudo port uninstall name
查看有更新的软件以及版本:port outdated
升级可以更新的软件:sudo port upgrade outdated
另外mac还有另一种类似的安装工具叫brew,具体用法请查看官网

    推荐阅读