我尝试用安装使用以下命令伪军一个无业游民机上phanomjs(Ubuntu的忠实的64位):安装phantomjs通过对流浪汉傀儡VM不起作用
exec {"npm install -g phantomjs":
path => "/usr/bin",
require => [
Package["nodejs-legacy"]
]
}
这将导致以下错误(从/home/vagrant/npm-debug.log)
...
2550 info install [email protected]
2551 info postinstall [email protected]
2552 verbose about to build /usr/local/lib/node_modules/phantomjs
2553 info build /usr/local/lib/node_modules/phantomjs
2554 info install [email protected]
2555 verbose unsafe-perm in lifecycle false
2556 error Error: spawn ENOENT
2556 error at errnoException (child_process.js:988:11)
2556 error at Process.ChildProcess._handle.onexit (child_process.js:779:34)
2557 error If you need help, you may report this log at:
2557 error <http://github.com/isaacs/npm/issues>
2557 error or email it to:
2557 error <[email protected]>
2558 error System Linux 3.13.0-30-generic
2559 error command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "phantomjs" "--no-bin-links"
2560 error cwd /home/vagrant
2561 error node -v v0.10.25
2562 error npm -v 1.3.10
2563 error syscall spawn
2564 error code ENOENT
2565 error errno ENOENT
2566 verbose exit [ 1, true ]
[email protected]:~$
从控制台
相同这是为什么发生?哪里不对?如果我手动安装包装
vagrant ssh
sudo npm install -g phantomjs
它工作正常。
它看起来像你通过SSH使用sudo,但不是在puppet中? – Henry