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,请问该怎么办?
滿天的星座2017-04-25 09:03:29
It is estimated that phantomjs did not add its executable path to PATH.
# vim /etc/profile
At the end, add:
export PATH="$PATH:/yourpath"
怪我咯2017-04-25 09:03:29
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
export PHANTOMJS_EXECUTABLE=/usr/local/bin/phantomjs
Replace /usr/local/bin/phantomjs
with the binary file path after your own installation.
PHP中文网2017-04-25 09:03:29
ln -s /usr/local/src/phantomjs/bin/phantomjs /usr/local/bin/
/usr/local/src/phantomjs/bin/phantomjs is your installation path