1.安装Xcode
from App Store
2.安装MacPorts(https://www.macports.org/install.php)
注意系统版本,因为之前装错了版本,重装还导致了下面的问题
问题:Waiting for other installations to finish(参考:http://superuser.com/questions/169908/installer-hangs-on-waiting-for-other-installations-to-finish-despite-no-other)
解决:Chances are that a previous installation hung and the lock was never cleaned up.
1)sudo rm /private/var/db/mds/system/mds.install.lock
2) reboot
记得更新下,有点慢。(https://trac.macports.org/ticket/43228):
Terminal: sudo port selfupdate
3.安装CMake
(http://www.cmake.org/download/)
之前有安装过但是失败了,说是没验证不能运行,重新安装了下还是有这个问题,调整了下mac的安全权限:
(参考: