When doing anything with apt, I get the following warnings:
W: The repository 'https://deb.nodesource.com/node_6.x xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://deb.nodesource.com/node_6.x/dists/xenial/main/source/Sources Received HTTP code 403 from proxy after CONNECT
I warns me about your repository not exposing a Release file. Due this, my apt-cacher-ng proxy doesn't trust that repo and refuse to connect with it.
I suggest you to publish a Release file.
The release file is here:
https://deb.nodesource.com/node_6.x/dists/xenial/Release
where it's supposed to be. I'm not sure how you have your proxy configured, but it looks like it's trying to get a Sources file that's not gzipped, when the correct Sources file is at
https://deb.nodesource.com/node_6.x/dists/xenial/main/source/Sources.gz
That's the standard place where it is for all of the distros we support.
There is nothing bad with nodesource repo. It is my apt-cacher-ng not configured for https. https://github.com/docker/docker/issues/9592#issuecomment-77040426
http://blog.packagecloud.io/eng/2015/05/05/using-apt-cacher-ng-with-ssl-tls/
Getting the same error on linux mint sarah based on ubuntu xenial
% uname -a
Linux champu-desktop 4.4.0-36-generic #55-Ubuntu SMP Thu Aug 11 18:01:55 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
I am not using any proxy
W: The repository 'https://deb.nodesource.com xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://deb.nodesource.com/dists/xenial/main/source/Sources 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
I am also seeing a 404 error at
Err:6 https://deb.nodesource.com xenial/main Sources
404 Not Found
@jahagirdar your apt is looking in the wrong place. It should be looking somewhere like:
https://deb.nodesource.com/node_4.x
for a Release file.
FYI I was getting the below error from setup_6 in my FROM ubuntu:16.04 Dockerfile. It uses apt-cacher-ng, writes Acquire::http { Proxy "http://172.17.0.1:3142"; }; into /etc/apt/apt.conf.d/01proxy.
Stopping and deleting my apt-cacher-ng container (including its volume) and recreating it seems to have fixed it. I don't know if the problem will reappear in a future build.
The repository 'https://deb.nodesource.com/node_6.x xenial Release' does not have a Release file.
E: Failed to fetch https://deb.nodesource.com/node_6.x/dists/xenial/main/source/Sources Received HTTP code 403 from proxy after CONNECT
E: Some index files failed to download. They have been ignored, or old ones used instead.
Error executing command, exiting
The command '/bin/sh -c curl -fsSL https://deb.nodesource.com/setup_6.x | bash - && apt-get install -y nodejs && npm config set spin=false' returned a non-zero code: 1
I'm not sure how your cacher is configured, but the (gzipped) Sources file is definitely there:
https://deb.nodesource.com/node_6.x/dists/xenial/main/source/
so apt should be picking it up.
Same symptoms in my case cured by ensuring path to /etc/ssl/certs/ca-certificates.crt had correct permissions as detailed here using sudo聽namei聽-mo聽/etc/ssl/certs/ca-certificates.crt to reveal wrong group for /etc/ssl/certs/ in my case.
The exact cause of the symptoms was revealed when adding verbose as in curl聽-vsL聽https://deb.nodesource.com/setup_7.x聽|聽sudo聽-E聽bash聽-. It reported
*聽聽聽Trying聽54.192.11.95...
*聽Connected聽to聽deb.nodesource.com聽(54.192.11.95)聽port聽443聽(#0)
*聽error聽reading聽ca聽cert聽file聽/etc/ssl/certs/ca-certificates.crt聽(Error聽while聽reading聽file.)
*聽Closing聽connection聽0
Thanks for the tip @iainhouston !
I meet the same problem when I use apt to install the NodeJS 7.x in Aliyun ECS (Ubuntu 16.xx). The problem was solved by comment the aliyun proxy config in the file '/etc/apt/apt.conf'.
#Acquire::http::Proxy "http://mirrors.aliyun.com/";
Most helpful comment
I meet the same problem when I use apt to install the NodeJS 7.x in Aliyun ECS (Ubuntu 16.xx). The problem was solved by comment the aliyun proxy config in the file '/etc/apt/apt.conf'.
#Acquire::http::Proxy "http://mirrors.aliyun.com/";