I've got an error when trying to start a virtual env with nodeenv :
$ nodeenv env
* Install node.js (0.8.16) ..Traceback (most recent call last):
File "/usr/local/bin/nodeenv", line 9, in <module>
load_entry_point('nodeenv==0.6.0', 'console_scripts', 'nodeenv')()
File "/usr/local/lib/python2.7/dist-packages/nodeenv-0.6.0-py2.7.egg/nodeenv.py", line 494, in main
create_environment(env_dir, opt)
File "/usr/local/lib/python2.7/dist-packages/nodeenv-0.6.0-py2.7.egg/nodeenv.py", line 410, in create_environment
install_node(env_dir, src_dir, opt)
File "/usr/local/lib/python2.7/dist-packages/nodeenv-0.6.0-py2.7.egg/nodeenv.py", line 332, in install_node
callit(['make'], opt.verbose, True, node_src_dir, env)
File "/usr/local/lib/python2.7/dist-packages/nodeenv-0.6.0-py2.7.egg/nodeenv.py", line 263, in callit
% (cmd_desc, proc.returncode))
OSError: Command make failed with error code 2
Didn't find anything on the web about this error, could you give me a little help ?
Well, got it by using verbose mode :
$ nodeenv env -v
g++ was missing
sudo apt-get install build-essential g++
Solves it !
Besides what @denis89 have metioned, after I add '-v' option, I found nodeenv reported:
'g++: internal compiler error: Killed (program cc1plus)'.
After Googled I conclude that the memory of the machine is insuffient. Because I run nodeenv in Vagrant, it's easy to change the memory like this:
config.vm.provider "virtualbox" do |v|
v.name = "working"
v.memory = 2048
end
May this answer can be help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With