linux 安装phantomjs
来源:互联网 发布:php 魔术方法 get set 编辑:程序博客网 时间:2024/06/08 02:43
前言
linux使用npm install报错
Copying to target path /root/.jenkins/workspace/prd-matrix-web/node_modules/_chromedriver@2.33.2@chromedriver/lib/chromedriver
Fixing file permissions
Done. ChromeDriver binary available at /root/.jenkins/workspace/prd-matrix-web/node_modules/_chromedriver@2.33.2@chromedriver/lib/chromedriver/chromedriver
PhantomJS not found on PATH
Download already available at /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Verified checksum of previously downloaded file
Extracting tar contents (via spawned process)
Error extracting archive
Phantom installation failed { [Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
]
killed: false,
code: 2,
signal: null,
cmd: ‘tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2’ } Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
at ChildProcess.exithandler (child_process.js:202:12)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Socket. (internal/child_process.js:323:11)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at Pipe._onclose (net.js:484:12)
✖ Install fail! Error: post install error, please remove node_modules before retry!
解决方法
安装phantomjs
一、下载
http://download.csdn.net/download/fengsen0515/10035568
二、解压
tar -xjvf phantomjs-2.1.1-linux-x86_64.tar.bz2
(如果解压报错,需要安装bz2:yum install bz2)
三、创建链接
ln -s /apps/phantomjs/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/bin
(PS:/apps/phantomjs/phantomjs-2.1.1-linux-x86_64/bin/phantomjs是绝对地址)
四、测试
phantomjs –version
- Linux安装phantomjs
- linux下安装phantomjs
- linux 安装phantomjs
- 在linux下安装phantomjs和selenium
- CentOS Linux上的phantomjs安装教程
- Phantomjs安装(Windows以及Linux环境)
- 安装phantomjs
- 安装phantomjs
- PhantomJs安装
- phantomjs安装
- 安装PhantomJS
- 安装PhantomJS
- Linux/Centos下安装部署phantomjs 及使用
- 安装casperjs和phantomjs
- phantomjs安装、使用
- phantomjs安装使用
- 安装 caseprjs 和 phantomjs
- centOS安装phantomjs
- iOS 获取当前时间及时间戳的互换
- Maven本地仓库引入jar包
- MyEclipse 10的使用技巧
- LoadRunner 设置脚本参数关联总结
- C语言基本数据类型简介
- linux 安装phantomjs
- sigmoid和tanh求导的最终结果,以及Sigmoid函数与损失函数求导
- 递归和循环优缺点详解
- iOS 11种键盘布局总结
- c# var
- Android中网络编程
- 数据库读写分离 spring-common.xml和jdbcConfig.properties配置
- linux 压缩软链接引发的问题
- iOS UITextField 显示银行卡格式