I get an error when i try apt-get update? - linux

I'm trying to update my server with apt-get update and this error shows up...
My Server runs on Ubuntu 18.04
Ign:1 https://packages.sury.org/php bionic InRelease
Err:2 https://packages.sury.org/php bionic Release
404 Not Found [IP: 138.199.37.227 443]
Ign:3 http://old-releases.ubuntu.com/ubuntu bionic InRelease
Hit:4 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
Ign:5 http://old-releases.ubuntu.com/ubuntu bionic-updates InRelease
Ign:6 http://old-releases.ubuntu.com/ubuntu bionic-security InRelease
Err:7 http://old-releases.ubuntu.com/ubuntu bionic Release
404 Not Found [IP: 185.125.190.40 80]
Err:8 http://old-releases.ubuntu.com/ubuntu bionic-updates Release
404 Not Found [IP: 185.125.190.40 80]
Err:9 http://old-releases.ubuntu.com/ubuntu bionic-security Release
404 Not Found [IP: 185.125.190.40 80]
Hit:10 https://packagecloud.io/pufferpanel/pufferpanel/ubuntu bionic InRelease
Reading package lists... Done
E: The repository 'https://packages.sury.org/php 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.
E: The repository 'http://old-releases.ubuntu.com/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.
E: The repository 'http://old-releases.ubuntu.com/ubuntu bionic-updates 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.
E: The repository 'http://old-releases.ubuntu.com/ubuntu bionic-security 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.
Does anybody know how i can fix that?

It looks like you are using repositories that do not contain this version of ubuntu (http://old-releases.ubuntu.com/ubuntu) and others designed for Debian (https://packages.sury.org/php).
I recommend you edit your /etc/apt/sources.list file, replace the content with the one you can find in this repository and then try with:
apt update

Related

Updating from such a repository can't be done securely and repository is not signed errors

I run sudo apt-get update then I get this error
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 https://deb.nodesource.com/node_16.x focal InRelease
Err:3 http://ph.archive.ubuntu.com/ubuntu focal InRelease
403 Forbidden [IP: 202.79.184.254 80]
Err:4 http://ph.archive.ubuntu.com/ubuntu focal-updates InRelease
403 Forbidden [IP: 202.79.184.254 80]
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease
Err:6 http://ph.archive.ubuntu.com/ubuntu focal-backports InRelease
403 Forbidden [IP: 202.79.184.254 80]
Hit:7 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu focal InRelease
Hit:8 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu focal InRelease
Hit:9 http://ppa.launchpad.net/sylvain-pineau/kazam/ubuntu focal InRelease
Reading package lists... Done
N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
E: The repository 'http://ph.archive.ubuntu.com/ubuntu focal InRelease' is not signed.
E: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/focal/InRelease 403 Forbidden [IP: 202.79.184.254 80]
E: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease 403 Forbidden [IP: 202.79.184.254 80]
E: The repository 'http://ph.archive.ubuntu.com/ubuntu focal-updates InRelease' is not signed.
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.
E: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease 403 Forbidden [IP: 202.79.184.254 80]
E: The repository 'http://ph.archive.ubuntu.com/ubuntu focal-backports InRelease' is not signed.
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 tried searching everywhere and checked related topics but none seems working.
How do I resolve this?
I have passed through the same problem. The solution was to change my internet connection. The problem seem to have been the firewalls in my corporation network that gave me the same exact messages, including the IP address that you've pasted.
I changed my network connection to a different one and that worked for me. I think firewall of the first network disabled updates to save bandwidths or something like that.
Had the same error but with a different repository.
Try this out if it works for you.
ls /etc/apt/sources.list.d
listing the repositories.
rm -i /etc/apt/sources.list.d/output of 1
Then of course run.
apt upgrade
More details in the screenshots in these links.

getting 404 Not Found [IP: 91.189.95.85 80] error when trying to install/apt update on WSL ubuntu18.04 OS

followed below link to install sublime-text on WSL ubuntu18.04 image,
https://tecadmin.net/install-sublime-text-editor-on-ubuntu/
but getting error on apt update:
Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Err:2 https://download.sublimetext.com apt/stable/ InRelease
Temporary failure resolving 'download.sublimetext.com'
Err:3 http://archive.ubuntu.com/ubuntu bionic InRelease
Temporary failure resolving 'archive.ubuntu.com'
Ign:4 http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu bionic InRelease
Hit:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Err:7 http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu bionic Release
404 Not Found [IP: 91.189.95.85 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/webupd8team/sublime-text-3/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.
new to WSL, help will be appreciated in this regard.
and also any other open source tool which can help in counting and restricting the git commit message to 72 char.

Cannot run apt update on debian:bullseye on armv7 because the time is not set corectly

This works with debian:latest, but my issue is that I require glibc 2.29 or higher, which this does not provide. When I use debian:bullseye, and I try to update, I get the following:
root#d96ef2e6eeb8:/# apt update
Get:1 http://deb.debian.org/debian bullseye InRelease [123 kB]
Get:2 http://deb.debian.org/debian bullseye-updates InRelease [40.1 kB]
Get:3 http://security.debian.org/debian-security bullseye-security InRelease [44.1 kB]
Err:1 http://deb.debian.org/debian bullseye InRelease
At least one invalid signature was encountered.
Err:2 http://deb.debian.org/debian bullseye-updates InRelease
At least one invalid signature was encountered.
Err:3 http://security.debian.org/debian-security bullseye-security InRelease
At least one invalid signature was encountered.
Reading package lists... Done
W: GPG error: http://deb.debian.org/debian bullseye InRelease: At least one invalid signature was encountered.
E: The repository 'http://deb.debian.org/debian bullseye InRelease' is not signed.
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.
W: GPG error: http://deb.debian.org/debian bullseye-updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://deb.debian.org/debian bullseye-updates InRelease' is not signed.
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.
W: GPG error: http://security.debian.org/debian-security bullseye-security InRelease: At least one invalid signature was encountered.
E: The repository 'http://security.debian.org/debian-security bullseye-security InRelease' is not signed.
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 assume that this is because of
root#adb7b60e4bfd:/# date
Thu Jan 1 00:00:00 UTC 1970
however, I cannot set it up correctly:
root#41e9609d3b81:/# hwclock --hctosys
hwclock: Cannot access the Hardware Clock via any known method.
Is there an image that is known to work correctly on armv7, and has glibc 2.29 or higher; or alternatively, is there a fix to the problem with this image?

apt-get update fails inside Dockerfile

When I try to build a simple docker image:
in Dockerfile:
FROM ubuntu:18.04
RUN apt-get update
The output is:
$ sudo docker build --no-cache -t testbuild .
Sending build context to Docker daemon 3.471MB
Step 1/2 : FROM ubuntu:18.04
---> c090eaba6b94
Step 2/2 : RUN apt-get update
---> Running in 53d64603442f
Ign:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Ign:2 http://security.ubuntu.com/ubuntu bionic-security InRelease
Ign:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Err:4 http://security.ubuntu.com/ubuntu bionic-security Release
404 Not Found [IP: 91.189.88.142 80]
Ign:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Err:6 http://archive.ubuntu.com/ubuntu bionic Release
404 Not Found [IP: 91.189.88.152 80]
Err:7 http://archive.ubuntu.com/ubuntu bionic-updates Release
404 Not Found [IP: 91.189.88.152 80]
Err:8 http://archive.ubuntu.com/ubuntu bionic-backports Release
404 Not Found [IP: 91.189.88.152 80]
Reading package lists...
E: The repository 'http://security.ubuntu.com/ubuntu bionic-security Release' does not have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu bionic Release' does not have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu bionic-updates Release' does not have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu bionic-backports Release' does not have a Release file.
The command '/bin/sh -c apt-get update' returned a non-zero code: 100
I tried:
build with different types of ubuntu images - e.g. ubuntu:16.04, 18.04,20.04 - and get a similar error '...Release' does not have a Release file.'
I completely removed and reinstalled docker from my system, inc all containers and repository, and rebooted, and get the same error
I previously built multiple docker images and everything worked fine. And now I get this error out of nowhere all the time.

apt update error with ubuntu 18.10 cosmic version [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
Problem: impossible to execute 'apt-get update' (Ubuntu 18.10)
Ubuntu 18.10 cosmic end of life
I tried to upgrade my system version but i got the same error of apt-get update command
$ apt update
Ign:1 http://archive.ubuntu.com/ubuntu cosmic InRelease
Ign:2 http://security.ubuntu.com/ubuntu cosmic-security InRelease
Ign:3 http://archive.ubuntu.com/ubuntu cosmic-updates InRelease
Ign:4 http://archive.ubuntu.com/ubuntu cosmic-backports InRelease
Err:5 http://security.ubuntu.com/ubuntu cosmic-security Release
404 Not Found [IP: 91.189.88.173 80]
Err:6 http://archive.ubuntu.com/ubuntu cosmic Release
404 Not Found [IP: 91.189.88.31 80]
Err:7 http://archive.ubuntu.com/ubuntu cosmic-updates Release
404 Not Found [IP: 91.189.88.31 80]
Err:8 http://archive.ubuntu.com/ubuntu cosmic-backports Release
404 Not Found [IP: 91.189.88.31 80]
Reading package lists... Done
E: The repository 'http://security.ubuntu.com/ubuntu cosmic-security 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.
E: The repository 'http://archive.ubuntu.com/ubuntu cosmic 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.
E: The repository 'http://archive.ubuntu.com/ubuntu cosmic-updates 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.
E: The repository 'http://archive.ubuntu.com/ubuntu cosmic-backports 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.

Resources