1、使用XShell连接上CentOS7虚拟机,使用命令安装:yum -y install phantomjs无法安装,报错信息如下图
2、先下载再安装,命令如下图:如果没有工具,请先yum安装
3、将phantomjs-2.1.1-linux-x86_64.tar.bz2移动到/usr/local目录。mv /tmp/phantomjs-2.1.1-linux-x86_64.tar.bz2 /usr/local
4、解压phantomjs-2.1.1-li艘绒庳焰nux-x86_64.tar.bz2tar xvf phantomjs-2.1.1-l足毂忍珩inux-x86_64.tar.bz2如果提示lbzip2不存在,先安装bzip2,命令如下:yum -y install bzip2
5、解压完成后,phantomjs-2.1.1-linux-x86_64改名为phantomjs
6、建立符号链接到/usr/binln -s /usr/local/phantomjs/bin/phantomjs /usr/bin/phantomjs输入phantomjs出现交互命令行,安装完成
7、这里的是64位CentOS7的phantomjs安装,如果是32位,请下载安装phantomjs-2.1.1-linux-i686.tar.bz2