GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
I'm trying to debug an error I'm getting when installing gitteh. I'm running on CentOS 5.8, whose /usr/bin/python is 2.4. I've got python2.6 on the path and when I built my RPM for nodejs I modified all instances of #!/usr/bin/env python → #!/usr/bin/env python2.6, but that's not sufficient for scripts (like waf) that use #!/usr/bin/env python. So, as a total kludge I created ~/tmp/path_whackamole, created a symlink from /usr/bin/python2.6 to ~/tmp/path_whackamole/python and put ~/tmp/path_whackamole first on the path.
npm's lib/utils/lifecycle.js adds a couple of elements onto the front of the PATH and blindly assumes that I want /usr/bin (the path where node lives) first. I do not.
npm and node are in /usr/bin. I'm attempting to install a package from ~/tmp/package. Existing PATH is /home/blalor/tmp/path_whackamole:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/blalor/bin
What npm actually does:
I suppose what npm should do is up for debate, I suppose, but I don't want my PATH to be smashed…
I don't think that this is a problem that can be solved in a general way. Take it up with the CentOS rulers who decided that it was a good idea to have multiple different versions of python all installed at the same time.
I think you can set the PYTHON environment variable to /usr/bin/python2.6 and it should work.