centos,按照网上的教程:
sudo yum install gcc gcc-c++ make git openssl-devel freetype-devel fontconfig-devel
git clone git://github.com/ariya/phantomjs.git
cd phantomjs
git checkout 1.9
./build.sh
安装了一个多小时完成后输入phantomjs --v,显示-bash:phantomjs:command not found,请问该怎么办?
1
wangxiyu191 2015 年 1 月 17 日
phantomjs -v 或者 phantomjs --version
|
2
kisshere OP @wangxiyu191 都不行啊,还是-bash:phantomjs:command not found
|
3
binux 2015 年 1 月 17 日
install 了吗?
|
6
wangxiyu191 2015 年 1 月 18 日
|
7
9hills 2015 年 1 月 18 日
|
8
9hills 2015 年 1 月 18 日
不过这货也不用安装,直接本地运行就行。找到编译的目标文件夹。 ./phantomjs
|
9
ifyour 2017 年 3 月 4 日
亲测完美解决:
到[这里]( http://phantomjs.org/download.html )下载你对象系统的 phantomjs 文件,然后把 bin 目录的程序,放到当前系统的环境变量中. 最后执行 ```bash $ phantomjs -version v2.1.1 ``` 表示安装成功! |