The following tutorial is based on the Linux (CentOS) operating system, and only Linux needs a tutorial, because the Linux file location is too loose install node.js first switch to root user installation Openssl-devel
Su-
yum install Openssl-devel
Download source code yourself compile the tar.gz package in the following code according to the version of the Node.js official online, for example, I am now the latest 0.10.29
CD/USR/LOCAL/SRC
wget http://nodejs.org/dist/v0.10.29/node-v0.10.29.tar.gz
tar zxvf node-v0.10.29.tar.gz
CD node-v0.10.29
./configure make make
install
Check the version number to see if the installation is successful
Node-v
v0.10.29
Uninstall Node.js
Remove the package management with its own first
Yum Remove Nodejs npm-y
And so on, see how your operating system is managed, for example, if you're installing a node with brew, you need to use brew to remove it first.
manually remove residues
Go to/usr/local/lib Delete all node and Node_modules folders
Go to/usr/local/include Delete all node and Node_modules folders
Check the "local" Lib "include" folder inside the folder and delete all the "node" and "Node_modules" folders inside.
You can use the following command to find
Find ~/-name node find
~/-name node_modules
Go to/usr/local/bin Delete node's executable file
The following steps can be selected:
Delete:/USR/LOCAL/BIN/NPM
Delete:/usr/local/share/man/man1/node.1
Delete:/USR/LOCAL/LIB/DTRACE/NODE.D
Delete: RM-RF/HOME/[HOMEDIR]/.NPM
Delete: RM-RF/HOME/ROOT/.NPM