Use n to upgrade to node.js 5.5.0, but run node -v to see the version or v0.10.38

  node.js, question

My version of node is v0.10.38

# node -v
 v0.10.38

I want to upgrade to the latest version of 5.5.0

After searching, everyone said it was useful.nTo upgrade the node version.
So I installed itn

# npm install -g n
 /usr/bin/n -> /usr/lib/node_modules/n/bin/n
 n@2.1.0 /usr/lib/node_modules/n

Then runnHowever, it is suggested that there is no installed version of node.

# n
 
 Error: no installed version
 
 Usage: n [options/env] [COMMAND] [args]
 
 Environments:
 n [COMMAND] [args]            Uses default env (node)
 n io [COMMAND]                Sets env as io
 n project [COMMAND]           Uses custom env-variables to use non-official sources
 
 Commands: ... omitted after  ...

So I installed the latest version:

# n latest
 
 install : node-v5.5.0
 mkdir : /usr/local/n/versions/node/5.5.0
 fetch :  https://nodejs.org/dist/v5.5.0/node-v5.5.0-linux-x64.tar.gz
 # # # # # # # # # # # # # # # # # # # # # # # #
 installed : v5.5.0

However, the version of node is still 0.10.38.

# node -v
 v0.10.38

There is something wrong with node’s environment variables. You can take the absolute path to try it out.