I successfully update/install the latest version of node js by using those commands (the official curl
way not working for me) :
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/bin/node
However, the version of my node and nodejs become different :
$ node --version
v5.0.0
$ nodejs --version
v0.10.25
It seems the new node is installed in /usr/local/bin/node
, so i tried :
sudo ln -s /usr/bin/nodejs /usr/local/bin/node
But it returns :
ln: failed to create symbolic link ‘/usr/local/bin/node’: File exists
I also use this link :
$ sudo ln -s /usr/bin/nodejs /usr/bin/node
ln: failed to create symbolic link ‘/usr/bin/node’: File exists
I will use some frameworks that depend on node
, like Ionic
. Which node version will it use?
What should i do to solve this?
Thanks a lot for your help