"Reprint" Ubuntu16.04 Install the latest version Nodejs

Source: Internet
Author: User

Install the latest version of Nodejs update Ubuntu software source
sudo apt-get updatesudoinstall -y python-software-properties software-properties-Commonsudo add-apt-repository ppa:chris-lea/node. jssudo Apt-get Update

Installing Nodejs

sudo Install Nodejs sudo Install nodejs-legacysudoinstall NPM

Update NPM's package image source for quick and easy download

sudo npm config set registry https://registry.npm.taobao.orgsudo npm config List

Global Installation N Manager (for managing NODEJS versions)
sudo Install n-g

Install the latest Nodejs (stable version)

sudo N Stable sudo node-v

Qaq:apt-get update could not find the file
//Error codeW:the repository'Http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial Release'Does not has a Releasefile. N:data from such a repository can't be authenticated and is therefore potentially dangerous to use.N:see Apt-secure (8) manpage forrepository creation and User configuration details. e:failed to fetch http://ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/xenial/main/binary-amd64/packages 404 Not FoundE:some index files failed to download. They has been ignored, or old ones used instead.//A: Modify node-related files:/etc/apt/sources.list.d/chris-lea-ubuntu-node_js-xenial.listDeb http://Ppa.launchpad.net/chris-lea/node.js/ubuntu Trusty MainDEB-SRC http://Ppa.launchpad.net/chris-lea/node.js/ubuntu Trusty Main

Q:node-v exception
Node-v-bash:/usr/local/bin/node:permission deniedsudo node-vsegmentation Fault ( Core dumped)//  A: Reinstall Nodejs Manual removal/usr/local/lib//usr/local/bin//usr/local /bin//USR/LOCAL/BIN/NPM

Ubuntu Software Source

Modify the/etc/apt/sources.list to the following software source (back up before you change)
163 and inside under some network will continue to download the failure, you can change back to the official source download

SOURCE list

http://wiki.ubuntu.org.cn/Template: 16.04source

Ubuntu official
Deb http://cn.archive.ubuntu.com/ubuntu/xenial main restricted universe multiverseDeb http://cn.archive.ubuntu.com/ubuntu/xenial-security main restricted universe multiverseDeb http://cn.archive.ubuntu.com/ubuntu/xenial-updates main restricted universe multiverseDeb http://cn.archive.ubuntu.com/ubuntu/xenial-backports main restricted universe multiverseDeb http://cn.archive.ubuntu.com/ubuntu/xenial-proposed main restricted universe multiverseDEB-SRC http://cn.archive.ubuntu.com/ubuntu/xenial main restricted universe multiverseDEB-SRC http://cn.archive.ubuntu.com/ubuntu/xenial-security main restricted universe multiverseDEB-SRC http://cn.archive.ubuntu.com/ubuntu/xenial-updates main restricted universe multiverseDEB-SRC http://cn.archive.ubuntu.com/ubuntu/xenial-backports main restricted universe multiverseDEB-SRC http://cn.archive.ubuntu.com/ubuntu/xenial-proposed main restricted universe multiverse

A little gift to walk around, to Jane book Follow me



Ten Commandments S
Links: https://www.jianshu.com/p/2b24cd430a7d
Source: Pinterest
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.

"Reprint" Ubuntu16.04 Install the latest version Nodejs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.