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
Related
We are installing google-chrome-stable in databricks cluster using apt-get install. Which has been working fine for a long time, but since the past few days it has started to fail intermittently.
The following is the code that we run.
%sh
sudo curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub| apt-key add
sudo echo "deb https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
sudo apt-get -y update apt-get -y --fix-missing install google-chrome-stable````
The following is the error we see.
Get:7 https://dl.google.com/linux/chrome/deb stable/main amd64 Packages[1,075 B]
Fetched 2,886 B in 1s (4,041 B/s)
Reading package lists...
grep: E: Aborting install: No such file or directory E: Failed to fetch
http://archive.ubuntu.com/ubuntu/pool/main/s/systemd/udev_245.44ubuntu3.18_amd64.deb 404 Not Found [IP: 185.125.190.36 80]
E: Aborting install.
was trying to reinstall the package if failure occured using the follow code
%sh
i=0
while true;
echo "inside while loop"
sudo add-apt-repository --remove ppa:vikoadi/ppa
sudo apt-get -y --fix-missing install google-chrome-stable
do
if [ $(google-chrome --version| grep -c "Google Chrome") -gt 0 ]; then
echo "chrome installed"
break;
else
echo "chrome not installed trying another attempt"
echo "sleeping"
sleep 10000
fi
done
But the above logic did not work because - while loop breaks on installation failure.
I suggest checking to see if IPv6 is disabled on your network connection, and if so to enable it and then see if updating runs cleanly.
I had similar issues and found that various URLs used in the aptitude updater ( apt / apt-get ) did not resolve to anything from my computer, but after looking at the DNS I found that it only had AAAA IPv6 records and did not have records set for IPv4.
I'm trying to create a docker image. Here's my Dockerfile:
FROM mcr.microsoft.com/dotnet/aspnet:6.0
RUN apt update \
&& apt install -y apt-utils libgdiplus libc6-dev \
&& apt install -y procps
COPY . /Api
WORKDIR /Api
CMD [ "dotnet", "Api.dll" ]
When I run the docker build command, I see this error:
Step 1/5 : FROM mcr.microsoft.com/dotnet/aspnet:6.0
---> 914094d6a4a0
Step 2/5 : RUN apt update && apt install -y apt-utils libgdiplus libc6-dev && apt install -y procps
---> Running in 5e738881ba2b
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Err:1 http://deb.debian.org/debian bullseye InRelease
Temporary failure resolving 'deb.debian.org'
Err:2 http://deb.debian.org/debian-security bullseye-security InRelease
Temporary failure resolving 'deb.debian.org'
Err:3 http://deb.debian.org/debian bullseye-updates InRelease
Temporary failure resolving 'deb.debian.org'
Reading package lists...
Building dependency tree...
Reading state information...
All packages are up to date.
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian-security/dists/bullseye-security/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye-updates/InRelease Temporary failure resolving 'deb.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
Package apt-utils is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
apt
E: Package 'apt-utils' has no installation candidate
E: Unable to locate package libgdiplus
E: Unable to locate package libc6-dev
The command '/bin/sh -c apt update && apt install -y apt-utils libgdiplus libc6-dev && apt install -y procps' returned a non-zero code: 100
But when I open the http://deb.debian.org/debian/dists/bullseye/InRelease in my local browser, I can see it. And when I nslookup deb.debian.org I can see the answer immediately.
Why my Dockerfile can not access deb.debian.org, while my local PC can?
How can I make Dockerfile to use my local network during the build process?
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.
I am trying to run an openboxes docker installation but it won't install because of it being based on Jasper and it having issues being able to install software because of the distribution not being available. It just fails during the apt-get operations. I have tried all the fixes but just getting on a newer version of the operation system probably would work. How can I do this. How can I have it upgrade the Linux from Jasper to the latest or 19.xx during the docker-compose --build part of the installation?
Any help would be appreciated.
The errors I am getting but cannot resolve:
Step 4/15 : RUN apt-get update && apt-get install -y unzip zip
curl wget git && rm -rf /var/lib/apt/lists/*
---> Running in 52238d44699d Err http://security.debian.org jessie/updates InRelease
Err http://deb.debian.org jessie InRelease
Err http://deb.debian.org jessie Release.gpg Temporary failure
resolving 'deb.debian.org' Err http://security.debian.org
jessie/updates Release.gpg Temporary failure resolving
'security.debian.org' Reading package lists... W: Failed to fetch
http://deb.debian.org/debian/dists/jessie/InRelease
W: Failed to fetch
http://security.debian.org/debian-security/dists/jessie/updat
es/InRelease
W: Failed to fetch
http://security.debian.org/debian-security/dists/jessie/updat
es/Release.gpg Temporary failure resolving 'security.debian.org'
W: Failed to fetch
http://deb.debian.org/debian/dists/jessie/Release.gpg Tempor
ary failure resolving 'deb.debian.org'
W: Some index files failed to download. They have been ignored, or old
ones used instead. Reading package lists... Building
dependency tree... Reading state information... Package zip is not
available, but is referred to by another package. This may mean that
the package is missing, has been obsoleted, or is only available from
another source
E: Package 'zip' has no installation candidate ERROR: Service 'grails'
failed to build: The command '/bin/sh -c apt-get update &&
apt-get install -y unzip zip curl wget git &&
rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
I wish I could delete my original post. I couldn't find a way to do it but did find another docker implementation and was able to use that instead. Thank you for your interest in helping.
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