5

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.

Alexei
  • 14,350
  • 37
  • 121
  • 240
  • Duplicate of [E: Package 'pgadmin4' has no installation candidate](https://stackoverflow.com/questions/68808559/e-package-pgadmin4-has-no-installation-candidate) – DavidW Aug 17 '21 at 17:52

6 Answers6

2

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

1

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

  1. Execute: sudo nano /etc/apt/sources.list.d/pgadmin4.list
  2. Delete everything you see there and paste the following text: deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/bionic pgadmin4 main
  3. Save Changes by pressing Ctrl + x then Y and finally enter
  4. Execute: sudo apt install pgadmin4
    Done. I Hope it clarifies the answer.
ToastedGuy2
  • 113
  • 3
  • 10
  • I get error: The pgAdmin 4 server could not be contacted:Failed to launch pgAdmin4. Error: Error: spawn /usr/pgadmin4/venv/bin/python3 ENOENT – Alexei Oct 13 '21 at 17:31
  • 1
    That error comes from running pgAdmin 4. I'm still looking for a solution. I already post the question here: https://stackoverflow.com/questions/69552921/the-pgadmin-4-server-could-not-be-contacted-in-linux-mint-20-2 – ToastedGuy2 Oct 13 '21 at 18:18
1

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.

Lopofsky
  • 518
  • 6
  • 15
1

Check if the version you want it is still supported

https://www.debian.org/releases/

https://wiki.postgresql.org/wiki/Apt#News

hfsaito
  • 39
  • 1
  • 3
0

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 
Escapola
  • 117
  • 1
  • 5
  • It's not help. Same error – Alexei Nov 04 '21 at 07:28
  • Well it didn't help me either but reinstalled ubuntu (from 21.0 to 20.04 LTS ) and faced the same problem again , But this time it worked with the commands from this site [link] https://www.tecmint.com/install-postgresql-and-pgadmin-in-ubuntu/ – Escapola Nov 04 '21 at 17:16
  • let me know what happened ) @a_subscriber – Escapola Nov 04 '21 at 17:17
  • Not help. E: The repository 'https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/uma pgadmin4 Release' does not have a Release file. – Alexei Nov 04 '21 at 17:46
0

anyone seeing this in 2023 or later, if it doesn't work by following the answers above, try replacing bionic with whatever is the codename of the ubuntu version your distro based itself of.

im running linux mint 21.2, apparently codenamed vanessa, based of ubuntu 22.04 jammy, after naming that it worked for me

fmvio
  • 1
  • 2