Distributions: The repository... does not have a Release file

Created on 18 Oct 2017  Â·  26Comments  Â·  Source: nodesource/distributions

Installation fails (at least on xenial) with:

The repository 'https://deb.nodesource.com/node_6.x xenial Release' does not have a Release file., W:Data from such a repository can't be authenticated and is therefore potentially dangerous to use

Tested on multiple boxes from multiple locations/networks.

Tried installing manually and also with Ansible Galaxy roles geerlingguy/ansible-role-nodejs and nodesource/ansible-nodejs-role - they all fail. Apt-get update fails as as soon as the repositories are added:
https://github.com/nodesource/distributions

Repro steps:

curl --silent https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
VERSION=node_6.x
DISTRO="$(lsb_release -s -c)"
echo "deb https://deb.nodesource.com/$VERSION $DISTRO main" | sudo tee /etc/apt/sources.list.d/nodesource.list
echo "deb-src https://deb.nodesource.com/$VERSION $DISTRO main" | sudo tee -a /etc/apt/sources.list.d/nodesource.list
sudo apt-get update

Maybe it's just me though - I find it odd that I can't find others reporting the same problem...

Most helpful comment

After several hours and a few more hairs pulled out. I have at last found the solution. I am posting it here for those who find themselves in a similar situation, as there is very little help available. The solution is simple enough, that if you have spend as much time as I have to get here. You will hate it.

The solution:

  1. open /etc/sources.list.d/nodesource.list with your favorite text editor.
  2. remove the "s" from "https://" making it "http://" in both lines
  3. save the file.
  4. apt-get update && apt-get install ....

It should work as expected.

All 26 comments

```$ curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -

Installing the NodeSource Node.js v9.x repo...

Populating apt-get cache...

You're seeing this error because of a PPA on Launchpad, specifically:

http://ppa.launchpad.net/kaihengfeng/lp1292830/ubuntu

That's not something we can do anything about I'm afraid.

Thanks. Just in case anyone else comes across this, the error is caused by a PPA somewhere in /etc/apt/sources.list.d that is actually nothing to do with nodesource. The solution is to remove or update that PPA path.

what if it is the node source ppa causing the error? I have apt-cacher-ng. I'm not sure if that is the reason or how to work around it?

W: The repository 'https://deb.nodesource.com/node_10.x stretch 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_10.x/dists/stretch/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

It's not the repository, the Release file for Stretch is here:

https://deb.nodesource.com/node_10.x/dists/stretch/Release

yet the install still fails? Do I have to uninstall apt-cacher-ng? Turn that machine off? Set something else in the apt/sources.list.d/*?

I haven't touched apt-cacher-ng in probably ten years, so I'm afraid I really can't say. I'd recommend not using it as a starting point. If you take it out of the equation and things start working, then at least you know that it's something to do with the caching.

I'm giving up. I guess I have to wait until someone decides to update the package at the debian repository to a current enough version of node that will include npm. it's at 4.8.2 now. So, I'm thinking 2 years. Twelve hours is more than anyone should have to spend googling answers that, don't exist.

I'm just considering node as broken / with incomplete instructions to install.

People install that package from our repository several million times per week, so I really don't think our repo is broken in any way. Like I said, I'd stop using apt-cacher-ng and see what happens. I'd also make sure the target machine is able to see the Release file I indicated above. If it can't, then there may be something going on in your network (this can happen if you're behind a proxy, for example).

The easier solution:

Whatever i needed npm to install. I can download the sources and compile it. That seems easier than trying to install npm from broken repositories. And if I run into problems. I'm sure it won;t take twelve hours of googling.

I am not trying to assign blame, I just can't troubleshoot your machine. Though if memory serves, it shouldn't take more than a few minutes to configure things to stop using apt-cacher-ng. It doesn't need to be removed, you just have to configure apt to not use it. If you look here in the "Client Side Configuration" section, and just reverse what they are doing, I expect that would get you set up pretty quickly.

You can also just download the package directly and install it with dpkg. You can see the package listing here for Node 10.x:

https://deb.nodesource.com/node_10.x/pool/main/n/nodejs/

After several hours and a few more hairs pulled out. I have at last found the solution. I am posting it here for those who find themselves in a similar situation, as there is very little help available. The solution is simple enough, that if you have spend as much time as I have to get here. You will hate it.

The solution:

  1. open /etc/sources.list.d/nodesource.list with your favorite text editor.
  2. remove the "s" from "https://" making it "http://" in both lines
  3. save the file.
  4. apt-get update && apt-get install ....

It should work as expected.

@hillbilly-mark can you check if your system time is off?

@hillbilly-mark If the issue was that apt-cacher-ng wasn't configured to handle HTTPS, I'd strongly recommend just configuring it correctly to do so instead of falling back to insecure connections. There a section about how to do this on Debian's Wiki for apt-cacher-ng.

@chrislea can you help me with this i am getting the same error i have removed the ppas from software and updates when i run apt update it succeeds but when i try to run the command again,its getting stuck on the 404 error

$ bash < <(curl -sL https://raw.githubusercontent.com/spbooks/rails3v5/master/scripts/install_linux.sh)
Adding PPA for up-to-date Node.js runtime. Give your password when asked.
Evented I/O for V8 javascript. Node's goal is to provide an easy way to build scalable network programs
More info: https://launchpad.net/~chris-lea/+archive/ubuntu/node.js
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Hit:2 http://zw.archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://archive.canonical.com/ubuntu bionic InRelease
Ign:4 http://ppa.launchpad.net/chris-lea/node.js/ubuntu bionic InRelease
Hit:5 http://zw.archive.ubuntu.com/ubuntu bionic-updates InRelease
Get:6 http://zw.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Err:7 http://ppa.launchpad.net/chris-lea/node.js/ubuntu bionic Release
404 Not Found [IP: 91.189.95.83 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/chris-lea/node.js/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
tenny@ProBook:~$ sudo apt-get update
Ign:1 http://ppa.launchpad.net/chris-lea/node.js/ubuntu bionic InRelease
Hit:2 http://archive.canonical.com/ubuntu bionic InRelease
Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Err:4 http://ppa.launchpad.net/chris-lea/node.js/ubuntu bionic Release
404 Not Found [IP: 91.189.95.83 80]
Hit:5 http://zw.archive.ubuntu.com/ubuntu bionic InRelease
Hit:6 http://zw.archive.ubuntu.com/ubuntu bionic-updates InRelease
Get:7 http://zw.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/chris-lea/node.js/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
tenny@ProBook:~$

@tzvaita It looks like you're using my old Launchpad PPA that's not maintained anymore. Please use our NodeSource distributions instead.

Ok thanks Chris
I will get back to you once i try to get from that site
thanks for the response

On Mon, Jun 4, 2018, 19:05 Chris Lea notifications@github.com wrote:

@tzvaita https://github.com/tzvaita It looks like you're using my old
Launchpad PPA that's not maintained anymore. Please use our NodeSource
distributions https://github.com/nodesource/distributions/ instead.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nodesource/distributions/issues/541#issuecomment-394427884,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AlHvRjB5pKTxWbrD5iq_HYzWOw39M6gfks5t5WjUgaJpZM4P-Q_8
.

@chrislea thanks its done now

facing same issue on a cloud VPS
can't install anything it seems
sources.list.d file doesn't have neither http not https

apper same error through routing connection. Enable routes with netplan - refuse (

im getting the same thing on ubuntu server bionic. i cant copy/pasta because in vm:

image

@richardjharris - https://github.com/nodesource/distributions/issues/541#issuecomment-341202948

Thanks. Just in case anyone else comes across this, the error is caused by a PPA somewhere in /etc/apt/sources.list.d that is actually nothing to do with nodesource. The solution is to remove or update that PPA path.

this is a fresh ubuntu server install. i have added docker PPA but everything checked out before i tried to add nodejs. only thing in /etc/apt/sources.list.d is nodesource.list.

image

i see what happened now. in nodesource.list it has -s -c) instead of bionic in the url. not sure how that happened. ¯\_(ツ)_/¯

I had this issue when upgrading from ubuntu 16.04 to 18.04. If anyone else is having this issue, and comes across this then I would recommend manually modifying the sources to the bionic release, and then try again https://www.ubuntuupdates.org/ppa/nodejs_10.x

@hillbilly-mark This may not be an ideal solution, but you should consider using node in docker. For example, there are containers already built with node and npm installed, ready to go. You can use something like docker-compose to tell the node container where your source code is and how to start your node application. The container will run on top of your current OS with minimal overhead and just work. No installation needed (except that of docker and docker-compose of course), and it's super portable. You could even grab a node container, clone your repo in it, npm install, etc, and tell it how to start the server. Now you can literally run that container with docker or docker-compose. If you start using docker, you'll never even have to install node or npm ever again. And that makes me feel all warm and gooey inside :)

@richardjharris thanks its work !

@AlirezaEbrahimkhani how did you solve it exactly?

You had the same issue ?

zor@ansidemo:~/ansible-playbooks/apache_ubuntu1804$ ansible-playbook playbook.yml -l ubuntu1 -u zor
SSH password:

PLAY [all] ***********************

TASK [Gathering Facts] *******************
ok: [192.168.131.135]

TASK [Install prerequisites] *****************
failed: [192.168.131.135] (item=aptitude) => {"ansible_loop_var": "item", "changed": false, "item": "aptitude", "msg": "Failed to update apt cache: W:Updating from such a repository can't be done securely, and is therefore disabled by default., W:See apt-secure(8) manpage for repository creation and user configuration details., E:The repository 'http://ppa.launchpad.net/ansible/ansible/ubuntu focal Release' does not have a Release file."}

PLAY RECAP ***********************
192.168.131.135 : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

zor@ansidemo:~/ansible-playbooks/apache_ubuntu1804$

I had the same problem.
Solution:
1) Open file /etc/apt/sources.list.d/rpi-distro-ubuntu-ppa-focal.list
2) Comment first line (deb http://ppa.launchpad.net/rpi-distro/ppa/ubuntu focal main)
3) apt-get update works!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ignition picture Ignition  Â·  4Comments

SilkAndSlug picture SilkAndSlug  Â·  5Comments

normangilmore picture normangilmore  Â·  4Comments

chrisportela picture chrisportela  Â·  3Comments

thameemk612 picture thameemk612  Â·  3Comments