配置.bash_profile文件后一定要source
安装步骤
- 下载phantomjs,官网下载mac版本即可 http://phantomjs.org/download.html
- 下载后将phantomjs-2.1.1-macosx文件夹放到/Users/xxx目录下
- 终端输入vim .bash_profile
- 添加语句(i插入,esc退出,:wq保存关闭)
export PATH="/Users/xxx/phantomjs-2.1.1-macosx/bin:$PATH"
5. 终端输入source .bash_profile
测试
localhost:~ xxx$ phantomjs --version
2.1.1