全球安装的phantomjs-prebuilt在Debian中

时间:2017-07-01 00:07:45

标签: phantomjs

我试图在Debian Stretch VM中进行全局安装phantomjs-prebuilt。我意识到有一个预构建的Debian软件包,但是......

结果如下:

root@debian:~# npm install phantomjs-prebuilt -g
/usr/bin/phantomjs -> /usr/lib/node_modules/phantomjs-prebuilt/bin/phantomjs

> phantomjs-prebuilt@2.1.14 install /usr/lib/node_modules/phantomjs-prebuilt
> node install.js

Considering PhantomJS found at /usr/bin/phantomjs
Looks like an `npm install -g`
Could not link global install, skipping...
Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Receiving...
[========================================] 100%
Received 22866K total.
Extracting tar contents (via spawned process)
Removing /usr/lib/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-
x86_64.tar.bz2-extract-1498865633866/phantomjs-2.1.1-linux-x86_64 -> /usr/lib/node_modules/phantomjs-prebuilt/lib/phantom
Phantom installation failed { Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1498865633866/phantomjs-2.1.1-linux-x86_64' -> '/usr/lib/node_modules/phantomjs-prebuilt/lib/phantom'
errno: -13,
 code: 'EACCES',
 syscall: 'link',
 path: '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1498865633866/phantomjs-2.1.1-linux-x86_64',
 dest: '/usr/lib/node_modules/phantomjs-prebuilt/lib/phantom' } Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1498865633866/phantomjs-2.1.1-linux-x86_64' -> '/usr/lib/node_modules/phantomjs-prebuilt/lib/phantom'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! phantomjs-prebuilt@2.1.14 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the phantomjs-prebuilt@2.1.14 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2017-06-30T23_33_57_117Z-debug.log

如果我正确读取它,将tarball下载到/ tmp,解压缩tarball然后在/ usr / lib / node_modules中创建/ tmp文件的符号链接似乎很奇怪。

我只是做错了吗?其他npm包似乎没问题:

root@debian:~# npm install -g grunt-cli
/usr/bin/grunt -> /usr/lib/node_modules/grunt-cli/bin/grunt
+ grunt-cli@1.2.0
added 16 packages in 1.511s

如果重要:

root@debian:~# node -v
v8.1.2
root@debian:~# npm -v
5.0.3

0 个答案:

没有答案