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,请问该怎么办?
It is estimated that phantomjs did not add its executable path to PATH.
At the end, add:
Try the method on the first floor. Ok, if it doesn’t work, add the following sentence. It seems that I have encountered it before
Replace
/usr/local/bin/phantomjs
with the binary file path after your own installation.I encountered the same problem. How did I solve it?
ln -s /usr/local/src/phantomjs/bin/phantomjs /usr/local/bin/
/usr/local/src/phantomjs/bin/phantomjs is your installation path
Copy root/phantomjs/bin/phantomjs to system/bin and it’s done