[Ubuntu] Ubuntu 16 에 nodejs 및 npm 설치
1706 단어 linux
https://www.jianshu.com/p/2b24cd430a7d
단계:
ubuntu 소프트웨어 원본 업데이트
sudo apt-get update
sudo apt-get install -y python-software-properties software-properties-common
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
nodejs 설치
sudo apt-get install nodejs
sudo apt install nodejs-legacy
sudo apt install npm
npm 패키지 미 러 원본 업데이트, 빠 른 다운로드 편리
sudo npm config set registry https://registry.npm.taobao.org
sudo npm config list
전역 에 n 관리자 설치 (nodejs 버 전 관리 에 사용)
sudo npm install n -g
최신 nodejs 설치 (stable 버 전)
sudo n stable
sudo node -v
QA
Q: apt - get update 에서 파일 을 찾 을 수 없습니다.
// error code
W: The repository 'http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository 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 Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
// A: node :sudo gedit /etc/apt/sources.list.d/chris-lea-ubuntu-node_js-xenial.list
deb http://ppa.launchpad.net/chris-lea/node.js/ubuntu trusty main
deb-src http://ppa.launchpad.net/chris-lea/node.js/ubuntu trusty main
약서
작성 자: 10 반지 s 링크:https://www.jianshu.com/p/2b24cd430a7d 출처: 간 서 간 서 저작권 은 작가 의 소유 이 며, 어떠한 형식의 전재 도 작가 에 게 연락 하여 권한 을 수 여 받 고 출처 를 밝 혀 주 십시오.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
용감한 바로 가기 및 우분투 응용 프로그램안녕하세요 여러분, 이 기사에서는 모든 사이트에서 pwa를 생성하고 실행기 응용 프로그램으로 추가하는 방법을 설명하고 싶습니다. 일부 웹사이트는 PWA로 설치를 허용하지 않지만 유사한 애플리케이션을 원합니다. 1. ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.