centos - 安装phantomjs后输入phantomjs --v提示:-bash:phantomjs:command not found
世界只因有你
世界只因有你 2017-04-25 09:01:29
0
5
836

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,请问该怎么办?

世界只因有你
世界只因有你

reply all(5)
滿天的星座

It is estimated that phantomjs did not add its executable path to PATH.

# vim /etc/profile

At the end, add:

export PATH="$PATH:/yourpath"
刘奇

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.

PHPzhong

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template