/ programming

Nodeenv and error code 127

Just to member. Recently i wanted to use nodeenv on Fedora. During environment creation i've got:

nodeenv -p

*** OSError: Command curl --silent -L http://nodejs.org/di...node-v0.10.35.tar.gz | tar xzf - -C /home/eshlox/projects/eshlox.net/src --exclude ChangeLog --exclude LICENSE --exclude README.md failed with error code 127

First i thought that it is an issue with nodeenv because it wanted to download nodejs with version v0.10.35-RC1.tar.gz which doesn't exist. After some time i've realized that it is a problem with missing curl. If curl is missing download operation raises an exception which is catched in python and it tries to download version with added '-RC1' string. If it also fails then it returns error code 127. It happened to me twice, first because i didn't have curl and next when i didn't have tar. So the solutions was:

su -c 'yum install curl tar'