0

On RedHat Enterprise 7, trying to install node.js inside of a nodeenv (0.13.6) in a Python virtual environment (Python 2.7). When I do nodeenv -p, I get OSError: Command make --jobs=2 failed with error code 2...googling, the only reference to this is here. Not super useful for me, because I am already trying to install the newest version of node (4.2.1). Full trace of this is below:

$ nodeenv -p
 * Install node (4.2.1..Traceback (most recent call last):
  File "/usr/local/pythonenvs/producer/bin/nodeenv", line 11, in <module>
    sys.exit(main())
  File "/usr/local/pythonenvs/producer/lib/python2.7/site-packages/nodeenv.py", line 891, in main
    create_environment(env_dir, opt)
  File "/usr/local/pythonenvs/producer/lib/python2.7/site-packages/nodeenv.py", line 732, in create_environment
    install_node(env_dir, src_dir, opt)
  File "/usr/local/pythonenvs/producer/lib/python2.7/site-packages/nodeenv.py", line 608, in install_node
    build_node_from_src(env_dir, src_dir, node_src_dir, opt)
  File "/usr/local/pythonenvs/producer/lib/python2.7/site-packages/nodeenv.py", line 577, in build_node_from_src
    callit([make_cmd] + make_opts, opt.verbose, True, node_src_dir, env)
  File "/usr/local/pythonenvs/producer/lib/python2.7/site-packages/nodeenv.py", line 461, in callit
    % (cmd_desc, proc.returncode))
OSError: Command make --jobs=2 failed with error code 2

I then tried to install from prebuilt, using the instructions in this GitHub issue.

nodeenv -p --prebuilt

That seemed to work...

 * Install node (4.2.1... done.
 * Appending data to /usr/local/pythonenvs/producer/bin/activate

Except nothing actually installed -- tab completing shows no node or npm install (I have deactivated and re-activated the virtual environment):

$ no
nodeenv      nohup        nologin      notify-send
$ np
$ nproc

My other installs worked with the same instructions, so I'm at a loss for debugging this. Any hints or suggestions? If this is a permissions issue, where do I need to set / change them? The user already owns the virtual environment directory...

1 Answer 1

1

Okay, so I don't have a solution to the root cause (I suspect some sort of issue / conflict with make on my server), but I managed to get it installed via --prebuilt. I had to manually delete the node.js source from /usr/local/pythonenvs/producer/src/node-v4.2.1/, because the --prebuilt option was trying to copy those as if they were binaries. After deleting the directory, I downloaded / extracted from nodejs.org into the virtual environment's src directory. Then, the nodeenv -p --prebuilt command works fine.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.