Environment: Ubuntu 14.04
Note: Do not use sudo apt-get install NPM Nodejs, the above version is very old, running up there will be a lot of inexplicable problems
To the official website http://nodejs.cn/download/downloads the new release file, after decompression enters the bin directory, creates the soft link
sudo ln-s/home/ubuntu/node-v8.9.3-linux-x64/bin/node/usr/local/bin/node
sudo ln-s/home/ubuntu/ NODE-V8.9.3-LINUX-X64/BIN/NPM/USR/LOCAL/BIN/NPM
sudo ln-s/home/ubuntu/node-v8.9.3-linux-x64/bin/node/usr/ Bin/node
sudo ln-s/home/ubuntu/node-v8.9.3-linux-x64/bin/npm/usr/bin/npm
In addition, open the Command line window to perform node-v and npm-v to see if there are any installation successes.
Switch source for Taobao source
NPM Config Set Registry http://registry.npm.taobao.org/
Then download the installation: NPM install
Start Ubuntu automatic application startup applications preference. Click "Add" to add a new startup entry, adding the command you want to execute
For example: "Node/home/ubuntu/source/rosapi/app.js"