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

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…

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 19
  • Comments: 31 (7 by maintainers)

Most upvoted comments

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.

I am seeing the same issue as of today. Looks like the root cause for me is an expired certificate.

Err:4 https://deb.nodesource.com/node_14.x focal Release
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 23.220.206.29 443]
...
Reading package lists...
E: The repository 'https://deb.nodesource.com/node_14.x focal Release' no longer has a Release file.

Seems #1266 was already opened for that.

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.

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.

@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.

## Installing the NodeSource Node.js v9.x repo...
## Populating apt-get cache...
+ apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu yakkety InRelease
Hit:2 http://archive.ubuntu.com/ubuntu yakkety-updates InRelease                                                 
Hit:3 http://archive.ubuntu.com/ubuntu yakkety-backports InRelease                                               
Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease                                  
Hit:5 http://archive.ubuntu.com/ubuntu yakkety-security InRelease                             
Hit:6 http://archive.canonical.com/ubuntu yakkety InRelease                                   
Hit:7 http://dl.google.com/linux/chrome/deb stable Release                                    
Ign:8 http://ppa.launchpad.net/kaihengfeng/lp1292830/ubuntu xenial InRelease
Err:9 http://ppa.launchpad.net/kaihengfeng/lp1292830/ubuntu xenial Release
  403  Forbidden
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/kaihengfeng/lp1292830/ubuntu xenial Release' does no longer 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.

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.

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.

There is no nodesource.list file in /etc/apt/sources.list.d directory.
image

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.

Thanks it worked 😃

@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 😃

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. ¯\_(ツ)_/¯

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

@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:~$