我正在尝试在我的 CentOS 7 服务器上安装最新版本的节点。我按照这里的说明进行操作--https://www.hostingadvice.com/how-to/update-node-js-latest-version/。具体来说,我尝试过这个
[rails@server ~]$ sudo npm cache clean -f
npm WARN using --force I sure hope you know what you are doing.
[rails@server ~]$ sudo npm install -g n
/usr/bin/n -> /usr/lib/node_modules/n/bin/n
/usr/lib
└── [email protected]
[rails@server ~]$ sudo n stable
installing : node-v10.16.0
mkdir : /usr/local/n/versions/node/10.16.0
fetch : https://nodejs.org/dist/v10.16.0/node-v10.16.0-linux-x64.tar.gz
installed : v10.16.0 to /usr/local/bin/node
active : v6.16.0 at /bin/node
[rails@server ~]$ node -v
v6.16.0
正如您在上面看到的,尽管事实上一切似乎都安装成功,但我仍然显示旧版本。有谁知道如何安装最新版本?