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を再アップデートしてインストールできます。

おすすめ記事