I get this error message when trying to install via the sh scripts:
Which is very odd, because I am pretty sure xenial is supported right? And just to show what I'm running exactly:
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial
Any ideas?
Well the first thing I notice is that you're saying there's an error installing onto 14.04.2 LTS, but Xenial is 16.04. So there may be something weird happening there. Can you please show the full output from the installer script?
Oops that was a typo - changed title - and bear with me while i get that output...
Here's the full output:
:~$ sudo curl -sL http://deb.nodesource.com/setup_7.x | sudo -E bash -
## Installing the NodeSource Node.js v7.x repo...
## Populating apt-get cache...
+ apt-get update
Hit:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:3 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:4 http://security.ubuntu.com/ubuntu xenial-security/main Sources [63.6 kB]
Get:5 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:6 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [24.4 kB]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [230 kB]
Get:8 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/main Sources [236 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [96.4 kB]
Get:10 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/universe Sources [142 kB]
Get:11 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [93.5 kB]
Get:12 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [50.7 kB]
Get:13 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [493 kB]
Get:14 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/main Translation-en [197 kB]
Get:15 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [434 kB]
Get:16 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [166 kB]
Fetched 2,532 kB in 3s (676 kB/s)
Reading package lists... Done
## Confirming "xenial" is supported...
+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_7.x/dists/xenial/Release'
## Your distribution, identified as "xenial", 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
:~$
Okay something is clearly amiss as Xenial is certainly supported. If you run the command:
curl -sLf https://deb.nodesource.com/node_7.x/dists/xenial/Release
from that machine does it pull down the Release file?
Yes it does (if I use http rather than https with curl):
$ curl -sLf http://deb.nodesource.com/node_7.x/dists/xenial/Release
Origin: Node Source
Label: Node Source
Codename: xenial
Date: Wed, 15 Mar 2017 14:24:47 UTC
Architectures: i386 amd64 armhf
Components: main
Description: Apt Repository for the Node.JS 7.x Branch
MD5Sum:
bf7f3a73f30f58aa0d6cce2a8430de73 2298 main/binary-i386/Packages
9657bf2f98b479668f158f3f9bbefc77 967 main/binary-i386/Packages.gz
72cb7778a26ad0fbc14f02158bb46e42 129 main/binary-i386/Release
6f49d49e29bd3b7e0100410c0780e36c 2303 main/binary-amd64/Packages
e5cb6152aadbfa48c65846552d435885 971 main/binary-amd64/Packages.gz
c5c300e6b2f385aeaf91f0153b635122 130 main/binary-amd64/Release
6f9ea49c1953ffdfc5838e961e400639 2302 main/binary-armhf/Packages
895328fb0c10420869449f8b3f281ae0 970 main/binary-armhf/Packages.gz
ead07e40148a7a75f28e5311699f923d 130 main/binary-armhf/Release
97d70565ed7848f128dcc668bf991337 1488 main/source/Sources
b9359608724e221e3950dc4a470d81d9 761 main/source/Sources.gz
513fd4a1446de1f655ea18fb8a5276fa 131 main/source/Release
SHA1:
bc890ca2b6d474220e79a99c6a8547f54a61f77e 2298 main/binary-i386/Packages
24ddadb19f78858f4b16b145c023264cedfb316b 967 main/binary-i386/Packages.gz
628bd21438c9ba4863e687a6762da1bd5a0e2cca 129 main/binary-i386/Release
52e35e2b7f4356bf4ea36da0ae0d2a8412ec3443 2303 main/binary-amd64/Packages
577dff611d489eef65a8427ebbc37722819c4554 971 main/binary-amd64/Packages.gz
ef2c54d8cef4679ffef5911ec952006d8c36803f 130 main/binary-amd64/Release
856b13f57e3accd127eb7eb31b2b61f788a4333b 2302 main/binary-armhf/Packages
101b139f260b71ac1d205a3459c9bd317ab7324d 970 main/binary-armhf/Packages.gz
ecf587bc686f4b12a134eee80f91fcf4b7b29ae1 130 main/binary-armhf/Release
54475000981ce7e037b4969ecbfaab524b05106e 1488 main/source/Sources
16055afa4082b6e5ce54526bc8423d9ae781f8bd 761 main/source/Sources.gz
527290f75fa0a423cd49befa53e2d1d3f108ed4e 131 main/source/Release
SHA256:
101c39f96e195d6e520843ce992d8a69bc9abba2a084447f40be488d94625547 2298 main/binary-i386/Packages
6ee1b6bd61d42fb252d6730014156a599e8dc1405fd27355dbc0cc5ebc91bd2c 967 main/binary-i386/Packages.gz
3fbfadccbab767d0f0e605f6b8a9a49974fdde92edb4b7249782b836a1a178c3 129 main/binary-i386/Release
34b5b69fd680dcf1135ae6838d65738b77d4b45693db0b6653e586c1e2579137 2303 main/binary-amd64/Packages
d046dc9933749746cd12e314f57dfcf0d04fae02626905a5632523d7c359ff9f 971 main/binary-amd64/Packages.gz
c16b57b1a890f614c11a84d47000ec857d3fe702c0ab677aea316b69d5c52c03 130 main/binary-amd64/Release
74c1369b21830a43f9ef1e98e87f0f36e4694538594f5613c356859d9276cf8e 2302 main/binary-armhf/Packages
4eda57eb11e299f9269a743ec4458f041c46296f906d0b906f414fb476c1b79d 970 main/binary-armhf/Packages.gz
f211a16d798acc3d24ba11d0ba492649b210424ba707929235be5fb1e4e6d677 130 main/binary-armhf/Release
fe9576658f0e355806436ca0238bd062e09c428d19a0a8347eadbfccfaf5cd7b 1488 main/source/Sources
d59b5c9800666268914e6f58b9d812ddde1281c289ae6b65e7dad6366fe82177 761 main/source/Sources.gz
9e12cdf72f2a8e9efde18407fd68d5d23e581b8a0222093f78966dfaff4730cc 131 main/source/Release
Well, okay, but what about if you are using https? The installer script will always try to use https, so if it's failing in that case for you then that would explain where the problem lies.
same problem in my ubuntu 16.04.2 and also Linux Mint 18.1 (Xenial Base). we just have to report and wait....the problem must be the PPA itself i think :)
I have this problem too. But after I retry, it is correct. Maybe a network problem.
sudo apt purge nodejs
sudo bash nodesource_setup.sh
sudo apt install nodejs
with the following docker file I'm seeing this same failure about 1 in 10 times.
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get -y install curl
RUN curl -sL https://deb.nodesource.com/setup_7.x | bash -
RUN apt-get install -y nodejs
RUN apt-get install -y build-essential
RUN apt-get install -y git
RUN npm install -g grunt
RUN npm install -g pm2
ENTRYPOINT ["/bin/bash"]
Here's some logs...
+ apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu xenial-security InRelease
Reading package lists...
## Installing packages required for setup: apt-transport-https lsb-release...
+ apt-get install -y apt-transport-https lsb-release > /dev/null 2>&1
## Confirming "xenial" is supported...
+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_7.x/dists/xenial/Release'
## Your distribution, identified as "xenial", 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
The command '/bin/sh -c curl -sL https://deb.nodesource.com/setup_7.x | bash -' returned a non-zero code: 1
We are still unable to replicate this. We appreciate the input @cicorias, but if it's failing "about 1 in 10 times" it's likely some kind of network error that we don't have any control over. If you pull down the file
https://deb.nodesource.com/node_7.x/dists/xenial/Release
on the affected node, does it look like it has the correct entries in it for Xenial?
but the script is indicating incorrect condition. Perhaps the script should hint about potential network failure. I know it's in there, and i'm know it's a network condition. This is failing for me in an AWS instance as well.
It's indicating an error but this isn't enough to see what the error is specifically.
Can you try pulling the script down and running it with the -x flag? IE:
% curl -RLO https://deb.nodesource.com/setup_7.x
% chmod +x setup_7.x
% sudo bash -x setup_7.x
and paste the full out put here?
Got the same problem under Ubuntu 16.04.02 (Xenial LTS) and I resolved it using apt install ca-certificates, because curl was complaining about deb.nodesource.com's certificate.
My issue was resolved - turns out it was due to https failing.
Had the same problem
Same issue here with Node 8, solution ?
the issue is definitely https related. I encountered same issue through corp network. After added nodesource.com to our proxy's SSL Bypass list, the issue went away.
Most helpful comment
I have this problem too. But after I retry, it is correct. Maybe a network problem.