Configurando o nó no Debian Jessie

0

Estou tentando instalar o NodeJS no meu servidor.

As instruções sugerem:

sudo apt-get update
sudo apt-get install nodejs

Para o qual eu recebo:

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

Eu encontrei este post:

Como instalar o NodeJS mais recente no Debian Jessie?

Eu tentei a sugestão, mas recebo um erro:

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

Alguém por favor pode me apontar na direção certa? Eu devo estar sentindo falta de algo idiota! Obrigado

    
por Andrew Newby 14.12.2016 / 16:13

1 resposta

1

Seus repositórios estão mal configurados. Como você está executando o Jessie, seu /etc/apt/sources.list precisa ter

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

Dada sua saída apt-get update , parece que você só tem repositórios Nginx lá. Se você adicionar as linhas acima, você poderá atualizar novamente e instalar o Node usando o pacote Debian nodejs (0.10) ou uma versão mais recente seguindo as instruções que você vinculou.

    
por 14.12.2016 / 16:30

Tags