'nodejs 10 stubbornly installing in ubuntu 20 even after adding new verision ppa
I am trying to install node.js latest version from node.js source official github repo. but after all running all commands yet, at apt-get install nodejs. system installs nodejs 10 version. I have already tried to this stack overflow. but even after running & installing software-common-properties. nothing changes.
The error showing up when i run curl -fsSL https://deb.nodesource.com/setup_17.x | sudo -E bash - is:
## Installing the NodeSource Node.js 17.x repo...
## Populating apt-get cache...
+ apt-get update
Ign:1 http://download.webmin.com/download/repository sarge InRelease
Hit:2 http://download.webmin.com/download/repository sarge Release
Hit:3 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:4 http://security.ubuntu.com/ubuntu focal-security InRelease
Ign:5 http://ppa.launchpad.net/certbot/certbot/ubuntu focal InRelease
Hit:6 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:8 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:9 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease
Err:10 http://ppa.launchpad.net/certbot/certbot/ubuntu focal Release
404 Not Found [IP: 91.189.95.85 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/certbot/certbot/ubuntu focal 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.
Error executing command, exiting
kindly help. thank you.
Solution 1:[1]
when i was running curl -fsSL https://deb.nodesource.com/setup_17.x | sudo -E bash - in terminal. then the command was not succedding for some reasons and failing (details below). due to that the nodejs version in the apt repo cache was not updating. so when i was installing nodejs by running apt-get install nodejs, it was always installing version 10.
so make sure that this command curl -fsSL https://deb.nodesource.com/setup_17.x | sudo -E bash - should run till end without any issue. in the last if sudo apt-get install -y nodejs line appears then your apt repo cache is updated. otherwise the command is failing.
The reason for failure in my case:
- i had
certbot installedwhich had added a source in the/etc/apt/sources.list.d/directory. the problem was not withcertbotinstall itself but with its apt source url. whenapt-get updatecommand was being run, thencertbot sourcewas being looked for which was not found on specified url. so it was causing404and hence failure. so i went to/etc/apt/sources.list.d/certbot-ubuntu-certbot-focal.listand commented all lines(only one line was active there). then again run the curl command. It worked this time.
so my advice is:
- make sure curl command works properly. for this i suggest to look for specific place where it is failing. I mean actually debug the script that is loaded from curl command. there are a lot of bash commands mentioned which is seting up everything.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
