无法在 Vagrant 中安装 strongloop
can't install strongloop inside Vagrant
我设法将它安装在我的主机 OSX 盒子上,但似乎无法将它安装在 vagrant 中:
有什么想法吗?
编者注,将错误信息粘贴在这里:
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ npm install -g strongloop
> heapdump@0.2.10 install /home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-supervisor/node_modules/heapdump
> node-gyp rebuild
make: Entering directory `/home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-supervisor/node_modules/heapdump/build'
CXX(target) Release/obj.target/heapdump/src/heapdump.o
make: g++: Command not found
make: *** [Release/obj.target/heapdump/src/heapdump.o] Error 127
make: Leaving directory `/home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-supervisor/node_modules/heapdump/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/vagrant/.nvm/v0.10.33/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.13.0-43-generic
gyp ERR! command "node" "/home/vagrant/.nvm/v0.10.33/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-supervisor/node_modules/heapdump
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing heapdump@0.2.10
> strong-fork-syslog@1.2.1 install /home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-supervisor/node_modules/strong-fork-syslog
> node-gyp rebuild
make: Entering directory `/home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-supervisor/node_modules/strong-fork-syslog/build'
CXX(target) Release/obj.target/syslog/syslog.o
make: g++: Command not found
make: *** [Release/obj.target/syslog/syslog.o] Error 127
make: Leaving directory `/home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-supervisor/node_modules/strong-fork-syslog/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/vagrant/.nvm/v0.10.33/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.13.0-43-generic
gyp ERR! command "node" "/home/vagrant/.nvm/v0.10.33/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-supervisor/node_modules/strong-fork-syslog
ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing strong-fork-syslog@1.2.1
> strong-agent@1.2.1 install /home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-agent
> node-gyp rebuild || exit 0
make: Entering directory `/home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-agent/build'
CXX(target) Release/obj.target/strong-agent/src/strong-agent.o
make: g++: Command not found
make: *** [Release/obj.target/strong-agent/src/strong-agent.o] Error 127
make: Leaving directory `/home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-agent/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/vagrant/.nvm/v0.10.33/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
ERR! System Linux 3.13.0-43-generic
gyp ERR! command "node" "/home/vagrant/.nvm/v0.10.33/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-agent
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
您的 VM 没有安装 G++,您可以通过安装 build-essential 包来解决这个问题,该包包含许多 "essential" 编译 C 和 C++ 代码所需的包(除其他外)。
strongloop 存储库中的 vagrantfile 安装了这个页面和其他几个页面,因此您可能需要更新 bootstrap 以安装以下内容
sudo apt-get install build-essential
我会将其添加到您的 bootstrap 文件或配置 playbooks/recipes 等以供将来使用。
编辑:
strongloop 存储库中的 vagrantfile 安装了这个页面和其他几个页面,因此您可能需要更新 bootstrap 以安装以下附加包
sudo apt-get install build-essential git curl vim
我设法将它安装在我的主机 OSX 盒子上,但似乎无法将它安装在 vagrant 中:
有什么想法吗?
编者注,将错误信息粘贴在这里:
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ npm install -g strongloop
> heapdump@0.2.10 install /home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-supervisor/node_modules/heapdump
> node-gyp rebuild
make: Entering directory `/home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-supervisor/node_modules/heapdump/build'
CXX(target) Release/obj.target/heapdump/src/heapdump.o
make: g++: Command not found
make: *** [Release/obj.target/heapdump/src/heapdump.o] Error 127
make: Leaving directory `/home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-supervisor/node_modules/heapdump/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/vagrant/.nvm/v0.10.33/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.13.0-43-generic
gyp ERR! command "node" "/home/vagrant/.nvm/v0.10.33/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-supervisor/node_modules/heapdump
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing heapdump@0.2.10
> strong-fork-syslog@1.2.1 install /home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-supervisor/node_modules/strong-fork-syslog
> node-gyp rebuild
make: Entering directory `/home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-supervisor/node_modules/strong-fork-syslog/build'
CXX(target) Release/obj.target/syslog/syslog.o
make: g++: Command not found
make: *** [Release/obj.target/syslog/syslog.o] Error 127
make: Leaving directory `/home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-supervisor/node_modules/strong-fork-syslog/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/vagrant/.nvm/v0.10.33/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.13.0-43-generic
gyp ERR! command "node" "/home/vagrant/.nvm/v0.10.33/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-supervisor/node_modules/strong-fork-syslog
ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing strong-fork-syslog@1.2.1
> strong-agent@1.2.1 install /home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-agent
> node-gyp rebuild || exit 0
make: Entering directory `/home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-agent/build'
CXX(target) Release/obj.target/strong-agent/src/strong-agent.o
make: g++: Command not found
make: *** [Release/obj.target/strong-agent/src/strong-agent.o] Error 127
make: Leaving directory `/home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-agent/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/vagrant/.nvm/v0.10.33/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
ERR! System Linux 3.13.0-43-generic
gyp ERR! command "node" "/home/vagrant/.nvm/v0.10.33/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/vagrant/.nvm/v0.10.33/lib/node_modules/strongloop/node_modules/strong-agent
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
您的 VM 没有安装 G++,您可以通过安装 build-essential 包来解决这个问题,该包包含许多 "essential" 编译 C 和 C++ 代码所需的包(除其他外)。
strongloop 存储库中的 vagrantfile 安装了这个页面和其他几个页面,因此您可能需要更新 bootstrap 以安装以下内容
sudo apt-get install build-essential
我会将其添加到您的 bootstrap 文件或配置 playbooks/recipes 等以供将来使用。
编辑:
strongloop 存储库中的 vagrantfile 安装了这个页面和其他几个页面,因此您可能需要更新 bootstrap 以安装以下附加包
sudo apt-get install build-essential git curl vim