MacPorts,曾经叫做DarwinPorts,是一个软件包管理系统,用来简化Mac OS X和Darwin操作系统上软件的安装。它是一个用来简化自由软件/开放源代码软件的安装的自由/开放源代码项目,与Fink和BSD类ports套件的目标和功能类似。跟BSD中的ports道理一样。MacPorts就像apt-get、yum一样,可以快速安装些软件。
基于源码安装
wget http://distfiles.macports.org/MacPorts/MacPorts-1.9.2.tar.gz
tar zxvf MacPorts-1.9.2.tar.gz
cd MacPorts-1.9.2
./configure && make && sudo make install
cd ../
rm -rf MacPorts-1.9.2*
1.9的版本已经很低了,可能系统不支持,安装失败,你可以查找下载更高版本:
安装后需要将/opt/local/bin和/opt/local/sbin添加到$PATH搜索路径中
编辑/etc/profile文件,执行:
$ sudo vi /etc/profile
加上
export PATH=$PATH:/opt/local/bin
expo