【问题标题】:Issue with installation of PhantomJS安装 PhantomJS 的问题
【发布时间】:2015-09-17 01:27:30
【问题描述】:

我在 Ubuntu 14.04 上设置 PhantomJS 时遇到问题,我使用 NPM 安装它,但它不起作用,安装停止在“70%”...

命令:sudo npm install phantomjs --save

> phantomjs@1.9.17 安装 /var/www/gestiaweb/GestionDettes.3000/node_modules/phantomjs > 节点安装.js 下载 https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2 保存到 /var/www/gestiaweb/GestionDettes.3000/node_modules/phantomjs/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2 接收... [=============================------------] 70% 0.0s 总共收到 12854K。 提取焦油内容(通过衍生过程) 删除 /var/www/gestiaweb/GestionDettes.3000/node_modules/phantomjs/lib/phantom 复制提取的文件夹 /var/www/gestiaweb/GestionDettes.3000/node_modules/phantomjs/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2-extract-1435657830806/phantomjs-1.9.8-linux-x86_64 -> / var/www/gestiaweb/GestionDettes.3000/node_modules/phantomjs/lib/phantom 编写 location.js 文件 完毕。 Phantomjs 二进制文件位于 /var/www/gestiaweb/GestionDettes.3000/node_modules/phantomjs/lib/phantom/bin/phantomjs phantomjs@1.9.17 node_modules/phantomjs ├── which@1.0.9 ├──进步@1.1.8 ├── kew@0.4.0 ├── request-progress@0.3.1 (throttleit@0.0.2) ├── adm-zip@0.4.4 ├── npmconf@2.1.1 (ini@1.3.4, uid-number@0.0.5, inherits@2.0.1, once@1.3.2, osenv@0.1.3, config-chain@1.1.9, nopt @3.0.3, semver@4.3.6, mkdirp@0.5.1) └── request@2.42.0 (caseless@0.6.0, forever-agent@0.5.2, aws-sign2@0.5.0, stringstream@0.0.4, oauth-sign@0.4.0, tunnel-agent@0.4 .0, json-stringify-safe@5.0.1, qs@1.2.2, node-uuid@1.4.3, mime-types@1.0.2, form-data@0.1.4, bl@0.9.4, http -signature@0.10.1、tough-cookie@2.0.0、hawk@1.1.1) icecom@web-test:/var/www/gestiaweb/GestionDettes.3000$

【问题讨论】:

  • 对我来说它安装得很好,如果是分块下载,百分比可能不正确。你试过运行它吗?
  • 是的,它在运行时不起作用,html-pdf 不要创建任何 PDF。 html-pdf安装自己phantomjs...

标签: npm phantomjs


【解决方案1】:

将可执行文件放入 PATH 中的目录(或将符号链接放入 PATH)或让 NPM 全局安装:

npm -g 安装 phantomjs

【讨论】:

  • 或者如果安装了它,只需从 phantomjs 的 bin 中执行 ln
猜你喜欢
  • 1970-01-01
  • 2014-05-31
  • 2016-04-01
  • 1970-01-01
  • 1970-01-01
  • 2013-02-21
  • 2017-12-22
  • 2015-04-18
  • 2016-08-27
相关资源
最近更新 更多