Настройка узла в 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

Я нашел это сообщение:

Как установить последнюю версию NodeJS на Debian Jessie?

Я попробовал это предложение, но получил сообщение об ошибке:

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

Кто-нибудь может указать мне правильное направление? Я, должно быть, упускаю что-то глупое! Спасибо

0
13.04.2017, 15:36
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 update , похоже, что у вас есть только Nginx репозитории там. Если вы добавите приведенные выше строки, вы сможете снова обновить и установить Node либо с помощью пакета Debian nodejs (0.10), либо из более новой версии, следуя инструкциям, на которые вы ссылаетесь.

1
28.01.2020, 02:47

Теги

Похожие вопросы