Debian Jessie에서 노드 설정

Debian Jessie에서 노드 설정

나는 그것을 원한다NodeJS내 서버에 설치되었습니다.

지침은 다음을 제안합니다.

sudo apt-get update
sudo apt-get install nodejs

나는 얻다:

root@steampunklinode:~# sudo apt-get update
Hit http://nginx.org jessie InRelease
Hit http://nginx.org jessie/nginx Sources
Hit http://nginx.org jessie/nginx amd64 Packages
Ign http://nginx.org jessie/nginx Translation-en_US
Ign http://nginx.org jessie/nginx Translation-en
Reading package lists... Done
root@steampunklinode:~# sudo apt-get install nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package nodejs

이 게시물을 찾았습니다.

Debian Jessie에 최신 NodeJS를 설치하는 방법은 무엇입니까?

거기에서 제안 사항을 시도했지만 오류가 발생했습니다.

root@steampunklinode:~# curl -sL https://deb.nodesource.com/setup | bash -

================================================================================
================================================================================

                           SCRIPT DEPRECATION WARNING

  This script, located at https://deb.nodesource.com/setup, used to
  install Node.js v0.10, is being deprecated and will eventually be made
  inactive.

  You should use the script that corresponds to the version of Node.js you
  wish to install. e.g.

   * https://deb.nodesource.com/setup_4.x â Node.js v4 LTS "Argon" (recommended)
   * https://deb.nodesource.com/setup_6.x â Node.js v6 Current

  Please see https://github.com/nodejs/LTS/ for details about which version
  may be appropriate for you.

  The NodeSource Node.js Linux distributions GitHub repository contains
  information about which versions of Node.js and which Linux distributions
  are supported and how to use the install scripts.
    https://github.com/nodesource/distributions

================================================================================
================================================================================

Continuing in 10 seconds (press Ctrl-C to abort) ...



## Installing the NodeSource Node.js v0.10 repo...


## Populating apt-get cache...

+ apt-get update
Hit http://nginx.org jessie InRelease
Hit http://nginx.org jessie/nginx Sources
Hit http://nginx.org jessie/nginx amd64 Packages
Ign http://nginx.org jessie/nginx Translation-en_US
Ign http://nginx.org jessie/nginx Translation-en
Reading package lists... Done

## Installing packages required for setup: apt-transport-https...

+ apt-get install -y apt-transport-https > /dev/null 2>&1
Error executing command, exiting

누군가 나에게 올바른 방향을 알려줄 수 있습니까? 내가 뭔가 멍청한 걸 놓친 게 틀림없어! 감사해요

답변1

저장소가 잘못 구성되었습니다. Jessie를 실행하고 있으므로 다음이 /etc/apt/sources.list필요합니다.

deb http://httpredir.debian.org/debian jessie main
deb-src http://httpredir.debian.org/debian jessie main

deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main

출력 결과 에 따르면 apt-get updateNginx 저장소만 있는 것 같습니다. 위 줄을 추가하면 nodejs링크된 지침에 따라 Debian 패키지(0.10) 이상을 사용하여 Node를 다시 업데이트하고 설치할 수 있습니다 .

관련 정보