404 error while trying to install nodejs in ubunutu - node.js

I am getting the following error message while trying to install nodejs:
Err http://in.archive.ubuntu.com/ubuntu/ quantal/main libc-ares2 amd64 1.9.1-3 404 Not Found [IP: 91.189.91.13 80]
Err http://in.archive.ubuntu.com/ubuntu/ quantal/universe nodejs amd64 0.6.19~dfsg1-5ubuntu1 404 Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/c/c-ares/libc-ares2_1.9.1-3_amd64.deb 404 Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/universe/n/nodejs/nodejs_0.6.19~dfsg1-5ubuntu1_amd64.deb 404 Not Found [IP: 91.189.91.13 80]
I had used the command:
sudo apt-get install nodejs
Has anybody faced this problem before ?

You should use this PPA to keep node up-to-date with the latest stable version. The Ubuntu/Debian repositories have node also, but they are not regularly updated and sometimes contain very outdated versions.
As #MarcB pointed out, the particular mirror you are currently using does not support quantal.

curl -sL https://deb.nodesource.com/setup | sudo bash
from their documentation https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#debian-and-ubuntu-based-linux-distributions

try out the following commands with the given key
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 68576280
sudo apt-add-repository "deb https://deb.nodesource.com/node_7.x $(lsb_release -sc) main"
sudo apt-get update
sudo apt-get install nodejs
The above mention code is for getting NodeJs version 7
for different versions you can check out the github page of nodesource (who maintains PPAs of nodejs) https://github.com/nodesource/distributions#debinstall

Related

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.
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 installed which had added a source in the /etc/apt/sources.list.d/ directory. the problem was not with certbot install itself but with its apt source url. when apt-get update command was being run, then certbot source was being looked for which was not found on specified url. so it was causing 404 and hence failure. so i went to /etc/apt/sources.list.d/certbot-ubuntu-certbot-focal.list and 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.

Installing Missing executable for Buildozer

I am new to coding in general and I have developed a simple app I want to convert to an .apk file.
I use Windows 10 so I have installed Oracle VM VirtualBox to run buildozer for conversion.
I have come across more different errors than I care to count, but the crux of my issues appear to be that I am missing executables:
[WARNING]: Missing executable: autoconf is not installed
[WARNING]: Missing executable: automake is not installed
[WARNING]: Missing executable: libtoolize is not installed
I have attempted to use:
sudo apt-get install autoconf
but I get the following:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
automake autotools-dev m4
Suggested packages:
autoconf-archive gnu-standards autoconf-doc libtool m4-doc
The following NEW packages will be installed:
autoconf automake autotools-dev m4
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 870 kB/1,067 kB of archives.
After this operation, 3,943 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Ign:1 http://fr.archive.ubuntu.com/ubuntu zesty/main amd64 autoconf all 2.69-10
Ign:2 http://fr.archive.ubuntu.com/ubuntu zesty/main amd64 autotools-dev all 20161112.1
Ign:3 http://fr.archive.ubuntu.com/ubuntu zesty/main amd64 automake all 1:1.15-5ubuntu1
Err:1 http://fr.archive.ubuntu.com/ubuntu zesty/main i386 autoconf all 2.69-10
404 Not Found [IP: 194.158.119.186 80]
Err:2 http://fr.archive.ubuntu.com/ubuntu zesty/main i386 autotools-dev all 20161112.1
404 Not Found [IP: 194.158.119.186 80]
Err:3 http://fr.archive.ubuntu.com/ubuntu zesty/main i386 automake all 1:1.15-5ubuntu1
404 Not Found [IP: 194.158.119.186 80]
E: Failed to fetch http://fr.archive.ubuntu.com/ubuntu/pool/main a/autoconf/autoconf_2.69-10_all.deb 404 Not Found [IP: 194.158.119.186 80]
E: Failed to fetch http://fr.archive.ubuntu.com/ubuntu/pool/main/a/autotools-dev/autotools-dev_20161112.1_all.deb 404 Not Found [IP: 194.158.119.186 80]
E: Failed to fetch http://fr.archive.ubuntu.com/ubuntu/pool/main/a/automake-1.15/automake_1.15-5ubuntu1_all.deb 404 Not Found [IP: 194.158.119.186 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
I have hit a wall after searching online for days looking for a solution but I have made no progress.
Ubuntu 17.04 (Zesty Zapus) reached End of Life on January 13, 2018. On the VM, you have to upgrade from Ubuntu 17.04 Zesty to Ubuntu 18.04 LTS Bionic. Please do the following:
sudo sed -i 's/zesty/bionic/g' /etc/apt/sources.list
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
sudo apt autoremove
sudo apt clean
Reboot the system

Installing NodeJS 4.4.7 or later on Ubuntu 16.04 server

In order to run a Meteor app created with the latest version of Meteor, I need to install Node.js 4.4.7 or greater on an Ubuntu 16.04 server. I have followed the instructions in the DigitalOcean tutorial exactly:
cd ~
curl -sL https://deb.nodesource.com/setup_6.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
However, when I execute the script, after a number of Get and Ign processes which seem to terminate without error, I get one 404 Not Found error, and then notification about Error executing command, exiting:
...
Ign:13 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main Translation-en
Err:7 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main amd64 Packages
404 Not Found
Ign:9 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main i386 Packages
Ign:11 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main all Packages
Ign:12 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main Translation-en_GB
Ign:13 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial/main Translation-en
Fetched 190 kB in 2s (74.5 kB/s)
Reading package lists... Done
W: The repository 'http://ppa.launchpad.net/chris-lea/node.js/ubuntu 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 http://ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
Error executing command, exiting
I have been able to install NodeJS 4.2.6, using sudo apt-get install nodejs but I have been unable to update to a newer version. What am I missing?
I found that the following steps solve this issue:
sudo apt-get update
sudo apt-get install build-essential libssl-dev curl
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash
Close and reopen terminal session
source ~/.profile
nvm ls-remote
nvm install v4.4.7
nvm use v4.4.7
node -v
Shows:
v4.4.7
Source:Installing using Node Version Manager (NVM)
Note: curl <url> | bash requires trust in the provider of the downloaded script.

sudo apt-get update fails on postgresql

I am trying to install nodejs but it keeps on failing. So I have uninstalled nodejs and found out that sudo apt-get update still fails. It's been so long that I have used postgresql. but here is my error during sudo apt-get update:
Get:41 http://ph.archive.ubuntu.com vivid-updates/universe Translation-en [81.6 kB]
Err http://apt.postgresql.org precise-pgdg InRelease
Err http://apt.postgresql.org precise-pgdg Release.gpg
Cannot initiate the connection to apt.postgresql.org:80 (2a00:f10:111:50::228). - connect (101: Network is unreachable) [IP: 2a00:f10:111:50::228 80]
Fetched 14.4 MB in 6min 3s (39.5 kB/s)
Reading package lists... Done
W: Failed to fetch http://apt.postgresql.org/pub/repos/apt/dists/precise-pgdg/InRelease
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)
W: Failed to fetch http://ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/vivid/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/vivid/main/binary-i386/Packages 404 Not Found
W: Failed to fetch http://apt.postgresql.org/pub/repos/apt/dists/precise-pgdg/Release.gpg Cannot initiate the connection to apt.postgresql.org:80 (2a00:f10:111:50::228). - connect (101: Network is unreachable) [IP: 2a00:f10:111:50::228 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.
As you can see, the first line succeeded and the rest of updates above it. The error started on the second line. I do not know where else to go. Please help me.
I could not proceed with anything since sudo apt-get update has a problem.
Try this:
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install -y nodejs

Install python-pip on Ubuntu 14.04.2 Issue

Attempting to install python-pip on a fresh Ubuntu 14.04.2 VM.
sudo apt-get update
sudo apt-get install python-pip
The error I get indicates some basic libc package can't be found:
Err http://archive.ubuntu.com/ubuntu/ trusty-security/main linux-libc-dev amd64 3.13.0-52.86
404 Not Found [IP: 91.189.91.15 80]
Fetched 26.1 MB in 4s (5918 kB/s)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_3.13.0-52.86_amd64.deb 404 Not Found [IP: 91.189.91.15 80]
And indeed, hitting the URL listed from a browser throws a 404.
Same issue happens when trying to install python-dev and python3-pip.
What's the workaround?
EDIT - Solved
The problem was actually that I was building the VM using vagrant and docker.
The RUN sudo apt-get update step in my Dockerfile was cached for some reason, meaning it was being skipped. Consequently, python-pip was probably looking for an outdated dependency.
I'm in a virtualenv, where all I had to do was this:
pip install --upgrade pip
Now that virtualenv is up to date - but I didn't have to mess with the rest of Ubuntu's pip on this system. Probably the best way to go, given how old Ubuntu's is and not wanting to mess with their packaging system.

Resources