Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nodeenv : error when trying to start env

Tags:

node.js

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 ?

like image 287
denis89 Avatar asked Dec 14 '12 12:12

denis89


2 Answers

Well, got it by using verbose mode :

$ nodeenv env -v

g++ was missing

sudo apt-get install build-essential g++

Solves it !

like image 138
denis89 Avatar answered Oct 07 '22 18:10

denis89


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.

like image 28
jerryleooo Avatar answered Oct 07 '22 18:10

jerryleooo