MAC 安装phantomjs

step1:下载压缩包http://phantomjs.org/

step2:解压缩,我是解压缩到/Users/gxy/software

step3:写入配置路径,vi ~/.bash_profile, 增加一行export PATH=/Users/gxy/software/phantomjs-2.1.1-macosx/bin:$PATH

step4:source ~/.bash_profile使文件生效(ps:第四步不能省略)

step5:phantomjs --version看到版本号,则安装成功 

原文地址:https://www.cnblogs.com/guoxueyuan/p/7267295.html