如何删除 nodejs 版本 4.2.6?

如何删除 nodejs 版本 4.2.6?

npm install gulp在 Ubuntu 中运行。显示此错误:

我的服务器是 Ubuntu 16.04。

框架是 Laravel 5.6。

ERROR: npm is known not to run on Node.js v4.2.6
Node.js 4 is supported but the specific version you're running has
a bug known to break npm. Please update to at least 4.7.0 to use this
version of npm. You can find the latest release of Node.js at https://nodejs.org/

我运行node -v显示此消息:v4.2.6

我运行sudo apt-get install --only-upgrade nodejs显示此消息:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
nodejs is already the newest version (9.11.1-1nodesource1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

nodejs已经是最新版本(9.11.1-1nodesource1)。

删除后nodejs,我运行node -v,显示消息:4.2.6!!!! 但是上面的消息已经删除了版本 9!

如何删除 nodejs 版本 4.2.6 ?如何解决这个问题?

相关内容