Debian stretch中预先构建的phantomjs的全局安装

Debian stretch中预先构建的phantomjs的全局安装,phantomjs,Phantomjs,我正在尝试在Debian Stretch虚拟机中对预先构建的phantomjs进行全局安装。我意识到有一个预先构建的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/l

我正在尝试在Debian Stretch虚拟机中对预先构建的phantomjs进行全局安装。我意识到有一个预先构建的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_模块中创建指向/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

为什么要使用
npm
安装系统软件包?为什么不使用apt get?您是否检查了目录
/usr/lib/node\u modules/phantomjs prebuild/lib/
是否已经存在?似乎复制文件失败了;可能目录被标记为只读,或者文件系统已满?