Nodejs Update leaves old version as current Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of Nodejs Update leaves old version as current without wasting too much if your time.

The question is published on by Tutorial Guruji team.

So I am trying to update NodeJS and running into issues. First I tried using nvm to update. I installed a new version, and I can use the new version manually, but nvm ls still shows

    v0.6.14
current: v0.4.12
default -> 0.6 (-> v0.6.14)

nvm use on the new version doesn’t do anything to change this message. nvm uninstall on the old version says I can’t unstall the currently-active node version (isn’t this what nvm use is supposed to do?).

So I tried installing the new version manually, following the steps in this guide.

cd $HOME/src
wget http://nodejs.org/dist/node-v0.4.11.tar.gz
tar -xzf node-v0.4.11.tar.gz
cd node-v0.4.11
alias python=python2.6
./configure --jobs=8 --prefix=$HOME
make && make install

This installs it, but the old node version is still being used by the shell.

What do I need to do to get rid of the old version of node, or at the very least get it to use the updated version (from either nvm or the shell, at this point anything works). Please excuse my general linux noobishness, I am still recovering from Windows use.

Answer

I was able to solve this by deleting the node file in $HOME/bin, and rerunning make install. I am still curious why make install didn’t overwrite the old version, this seems like the natural thing to do, but its working now. I will hold out for a better answer before accepting my own.

We are here to answer your question about Nodejs Update leaves old version as current - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji