Ubuntu 14.04에 최신 NodeJS 버전을 설치할 수 없습니다


11

내 서버에 나는이 0.10.25에 대한 LTS입니다 0.10.30 ""나는이 정말이에요의 버전이 필요하지 않습니다 " nodejs그러나 4 버전을 설치하라는 개발자가 조금 파고 후, 나는 것으로 나타났습니다, 0.12그것은 동일 nodejs일부와 합병을 다른 패키지.

에 대한 패키지 소스가 없으며 nodejs의 웹 사이트에서 파일 0.12을 다운로드 .tar.gz하고 압축을 풉니 다. 그러나 설치 스크립트가 포함되어 있지 않거나 수동으로 파일을 이동하거나 링크를 만드는 것이 원하는 방식이 아닙니다. 어떻게해야합니까?

최신 정보:

[web01]~> nodejs -v
v0.10.25
[web01]~> apt-get install curl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
curl is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[web01]~> curl -sL https://deb.nodesource.com/setup_4.x | sudo bash -
[web01]~> apt-get install -y nodejs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
nodejs is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[web01]~> uname -a
Linux web01.example.lab 3.19.0-28-generic #30~14.04.1-Ubuntu SMP Tue Sep 1 09:32:55 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[web01]~> 

3
최신 Node.js / MongoDB 설치의 가능한 복제본 ? node.js 0.12. 설치에 대한 지시 사항은 사용자의 답변을 참조하십시오.
karel

답변:


13

NodeJS를 설치하는 가장 쉬운 방법은 공식 PPA (최신 버전 (이 편집 당시 8.x)가 포함되어 있음)를 사용하는 것입니다.

터미널 ( Ctrl+ Alt+ T)을 열고 다음을 실행하십시오.

  1. 현재 NodeJS 설치 제거

    sudo apt-get purge nodejs*
    
  2. 설치 curl

    sudo apt-get install curl
    
  3. NodeJS를 설치하십시오.

    curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
    sudo apt-get install -y nodejs
    

4.1.1 버전이 아닌 0.12가 절대적으로 필요한 경우 다음을 실행하십시오.

  1. NodeJS를 설치하십시오.

    curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
    sudo apt-get install -y nodejs
    

1
도움이되지 않습니다. 문제의 업데이트를 참조하십시오.
Edik Mkoyan

편집 한 답변을 참조하십시오.
hg8

이전에 LinuxMint였던 Ubuntu의 배포판 이름을 변경 한 후에 만 ​​나를 위해 일했습니다. 처음으로 설치하려고 할 때 오류가 발생했습니다 ## Your distribution, identified as "petra", is not currently supported, please contact NodeSource at https://github.com/nodesource/distributions/issues if you think this is incorrect or would like your distribution to be considered for support. askubuntu.com/questions/115429/…
antongorodezkiy

당신은 명령 의 끝에 -E전에 추가해야합니다 ...bashcurl
smartmouse
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.