Error | sudo apt-get update : 404 Not Found [IP: 2604:1380:2000:7501::69 80] [closed] - postgresql

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I have been getting an error when I execute:
sudo apt-get update
Error:
Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:5 http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease
Ign:6 http://apt.postgresql.org/pub/repos/apt utopic-pgdg InRelease
Hit:7 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/bionic pgadmin4 InRelease
Err:8 http://apt.postgresql.org/pub/repos/apt utopic-pgdg Release
404 Not Found [IP: 2604:1380:2000:7501::69 80]
Reading package lists... Done
E: The repository 'http://apt.postgresql.org/pub/repos/apt utopic-pgdg 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.
I have gone through numerous similar questions, but none of the solutions helped me with this issue. I even replaced the source.list and tried to follow all the steps mentioned in these solutions.
As a new user to ubuntu server system, at this point, I am not sure if this is a program installation issue or a system issue.
Server: Ubuntu 18.04 LTS
Can anyone please assist me with this?

The problem is you have :
Ign:6 http://apt.postgresql.org/pub/repos/apt utopic-pgdg InRelease
There is no release for that version. FYI, the Postgres(PGDG) repos only cover LTS releases. You will need to get rid of the Ubuntu Utopic(14.10) repo. It is probably under:
/etc/apt/sources.list.d/pgdg.list
UPDATE. Add further step to find repo.
If that file does not exist try:
/etc/apt/grep -r -i utopic *
to find where the repo is listed.

use the rm function to remove all packages you cannot update, i.e after you check your source list and can confirm packages blocking your updates
or
simply remember that kali cannot update root files that do not follow the HTTPS protocols so if you have packages using only the HTTP protocol you need to simply change these to HTTPS protocols.

Related

The repository 'https://apt.postgresql.org/pub/repos/apt trusty-pgdg Release' does not have a Release file

Linux Mint 20.2
I want to install PgAdmin4.
Here OFFICIAL TUTORIAL
https://www.pgadmin.org/download/pgadmin-4-apt/
Steps:
sudo curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3935 100 3935 0 0 4517 0 --:--:-- --:--:-- --:--:-- 4512
sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'
Result:
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:4 http://archive.canonical.com/ubuntu focal InRelease
Hit:5 http://ppa.launchpad.net/kelleyk/emacs/ubuntu focal InRelease
Hit:6 http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease
Hit:7 https://repo.skype.com/deb stable InRelease
Hit:8 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:9 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:10 http://security.ubuntu.com/ubuntu focal-security InRelease
Ign:11 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/uma pgadmin4 InRelease
Ign:12 http://packages.linuxmint.com uma InRelease
Ign:13 https://apt.postgresql.org/pub/repos/apt trusty-pgdg InRelease
Err:14 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/uma pgadmin4 Release
404 Not Found [IP: 147.75.85.69 443]
Err:15 https://apt.postgresql.org/pub/repos/apt trusty-pgdg Release
404 Not Found [IP: 147.75.85.69 443]
Hit:16 http://packages.linuxmint.com uma Release
Reading package lists... Done
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease' doesn't support architecture 'i386'
E: The repository 'https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/uma pgadmin4 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 'https://apt.postgresql.org/pub/repos/apt trusty-pgdg 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:
E: The repository 'https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/uma pgadmin4 Release' does not have a Release file.
Please try to change /etc/apt/sources.list.d/pgadmin4.list file lines to deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/bionic pgadmin4 main
Bad tutorial boys
Widuranga Dilruksha already solved op question. But i just want to expand it.
The following steps have to be performed on terminal
Execute: sudo nano /etc/apt/sources.list.d/pgadmin4.list
Delete everything you see there and paste the following text: deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/bionic pgadmin4 main
Save Changes by pressing Ctrl + x then Y and finally enter
Execute: sudo apt install pgadmin4
Done. I Hope it clarifies the answer.
In my case the repo file was /etc/apt/sources.list.d/pgdg.list (Elementary OS 6).
The other answers don't cover the case where, sudo apt update raises:
W: GPG error: https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/bionic pgadmin4 InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8881B2A8210976F2
What solved this error was to get the PUBKEY 8881B2A8210976F2 and execute:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8881B2A8210976F2
Afterwards I was able to sudo apt update and then install postgres.
Check if the version you want it is still supported
https://www.debian.org/releases/
https://wiki.postgresql.org/wiki/Apt#News
I do agree with all other answers but before running
sudo apt install pgadmin4
You have to update apt and this is made by
Executing the following command int terminal
sudo apt update

MongoDB 4.4 / Raspberry Pi 4

I am trying to install MongoDB 4.4 on a Raspberry Pi 4 model B running Raspberry Pi OS 64 bits.
I would like to know the proper way to add the depository:
https://repo.mongodb.org/apt/debian/dists/buster/mongodb-org/4.4/
I believe it should be inserted in this folder:
/etc/apt/sources.list.d/
But I can't find the correct manner to do it.
I tried a few options, one being creating a file mongodb-org-4.4.list in the /etc/apt/sources.list.d directory containing this:
deb https://repo.mongodb.org/apt/debian/ buster main
But nothing worked. I always get some error message when running:
apt update
Something like:
Reading package lists... Done
E: The repository 'https://repo.mongodb.org/apt/debian buster 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.
........
Further information:
If I set the contents of /etc/apt/sources.list.d/mongodb-org-4.4.list to:
deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main
as recommended in the document Install MongoDB Community Edition on Debian.
This is the result of running apt-get update :
root#raspberrypi:/home/pi#
root#raspberrypi:/home/pi# apt-get update
Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://deb.debian.org/debian-security buster/updates InRelease
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Ign:4 http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 InRelease
Hit:5 http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 Release
Hit:6 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists... Done
N: Skipping acquire of configured file 'main/binary-armhf/Packages' as repository 'http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 InRelease' doesn't support architecture 'armhf'
N: Skipping acquire of configured file 'main/binary-arm64/Packages' as repository 'http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 InRelease' doesn't support architecture 'arm64'
root#raspberrypi:/home/pi#
If someone knows how to solve this please let me know.
Follow instructions in https://docs.mongodb.com/manual/tutorial/install-mongodb-on-debian/, specifically the part about adding keys.
There are no prebuilt packages for arm on Debian. https://www.mongodb.com/download-center/community/releases/archive does provide arm64 on Ubuntu 16.04.

Docker build failing with "Package 'mongodb' has no installation candidate"

Up until this morning, building my container was a smooth process, now I'm running into some issues with apt get -y mongodb.
I have a very simple Dockerfile, relevant code posted since this is all that is needed to make reproduce the issue.
FROM python:2.7
RUN apt-get update && \
apt-get -y install \
gpg \
mongodb \
I've researched some fixes but they seem a little overboard, should I just change my base image? I'm trying to understand the cause behind this error and how to future proof it.
Note, I forgot to put the trace.
Sending build context to Docker daemon 1.354GB
Step 1/7 : FROM python:2.7
2.7: Pulling from library/python
5ae19949497e: Pull complete
ed3d96a2798e: Pull complete
f12136850781: Pull complete
1a9ad5d5550b: Pull complete
6f18049a0455: Pull complete
900d7861659d: Pull complete
536c9e631831: Pull complete
cb522be31b83: Pull complete
d03d3d7b603d: Pull complete
Digest: sha256:ee76dd856d06bdd734e1c3c816b243c984586629708f0a3e32038f94a891a5d8
Status: Downloaded newer image for python:2.7
---> 3edf9092825f
Step 2/7 : RUN apt-get update && apt-get -y install gpg mongodb curl
---> Running in 870a931ec60c
Get:1 http://security.debian.org/debian-security buster/updates InRelease [39.1 kB]
Get:2 http://deb.debian.org/debian buster InRelease [118 kB]
Get:3 http://security.debian.org/debian-security buster/updates/main amd64 Packages [11.9 kB]
Get:4 http://deb.debian.org/debian buster-updates InRelease [46.8 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7897 kB]
Fetched 8113 kB in 4s (1805 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Package mongodb 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 'mongodb' has no installation candidate
The command '/bin/sh -c apt-get update && apt-get -y install gpg mongodb curl' returned a non-zero code: 100
I guess you delete the old python:2.7 image and rebuild your dockerfile or just change another pc to do the build. If you use a new image, you can see next:
orange#orange:~$ docker images python:2.7
REPOSITORY TAG IMAGE ID CREATED SIZE
python 2.7 3edf9092825f 8 hours ago 884MB
It shows the image was created 8 hours ago, so the image used is quite different compared the one you used days ago.
From this, if you do a search for python:2.7, you may see it now same with 2.7.16-buster, as you know, debian buster released a few days ago, see this:
2019-07-06: Initial release: 10.0 (press release)
So I guess days ago, the python:2.7 is based on debian stretch, so in new debian release, some packages removed which results in your failure.
Best practice:
You can see there are Simple Tags & Shared Tags in python dockerhub repo, please use Simple Tags which will not always change, don't use Shared Tags which may tag to other image id later, for your case, use python:2.7.16-stretch. In fact this base image is the one you used in the past which tagged as python:2.7, the one now which tagged as python:2.7 is not the one you used in the past.

Why apt-get can't find github-ee package on a Ubuntu 18.04 release?

# apt-get update
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Hit:2 http://ca.archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://ca.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://ca.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Hit:5 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu bionic InRelease
Hit:6 https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu bionic InRelease
Fetched 247 kB in 2s (111 kB/s)
Reading package lists... Done
# apt-cache search gitlab-ee
Search didn't find anything like gitlab-ee. However if I post the link https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu/ to the browser, I can find the gitlab-ee package for ubuntu/bionic.
It turned out my Ubuntu was 18.04 but 32bit version. It was upgraded from previous Ubuntu version. gitlab-ee does not support 32bit version anymore.
After updating to 18.04.01 server 64bit, gitlab-ce was installed without issues.
The installing process does not provide sufficient messages for installer to diagnose such issues. Believe me, I am not the only one running into such clueless issue. Actually I followed other people's similar cases which I found by googling.

postgres install issues on ubuntu

I am trying to install postgres on ubuntu and get errors related to fetching. Is there an alternative way to install?
sudo apt-get install postgresql postgresql-contrib
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/postgresql- 9.1/postgresql-client-9.1_9.1.17-0ubuntu0.12.04_amd64.deb 404 Not Found [IP: 91.189.91.15 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/postgresql-9.1/postgresql-9.1_9.1.17-0ubuntu0.12.04_amd64.deb 404 Not Found [IP: 91.189.91.15 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
On http://mirrors.ubuntu.com/mirrors.txt you can find list of mirrors recommended for you. If you open /etc/apt/sources.list as sudoer with your favourite text editor then you can use mirror. For example:
deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
You can change to
deb http://ubuntu.saix.net/ubuntu-archive/ precise main restricted universe multiverse
Naturally you will use one of links from your area. Don't forget to save your old sources.list. Also replace precise with your version of Ubuntu.