11

After Upgrading to Ubuntu-20.04 I am unable to install pgadmin4. Also, any other version of pgadmin is not working.

It is showing below error:

Package pgadmin4 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 'pgadmin4' has no installation candidate
E: Unable to locate package pgadmin4-apache2

In my "pgdg.list" file which can be accessed from below command

sudo nano /etc/apt/sources.list.d/pgdg.list

I have:

deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main
Shubham Soni
  • 111
  • 1
  • 1
  • 5
  • 1
    I have exactly the same problem. It's so disappointing that a key tool I use does not work on Ubuntu 20.04. – JPM May 04 '20 at 09:33
  • it's not added in debiean repository. https://askubuntu.com/questions/1230350/cant-install-pgadmin-4-on-20-04-lts – Thirumal May 13 '20 at 02:12

7 Answers7

10

You must create the /etc/apt/sources.list.d/pgdg.list file and add the line:

deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main

Then run:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

Finally, run:

sudo apt-get update && sudo apt-get install pgadmin4

For more details: https://www.postgresql.org/download/linux/ubuntu/

pkanane
  • 2,545
  • 2
  • 18
  • 17
zFortes
  • 101
  • 3
  • I've tried something similar and it didn't work, but yours did. I just removed [arch = amd64]. Thank you a lot! – Diego Alves May 26 '20 at 12:06
4

I'm having the same issue... apt.postgresql.org is in the "sources.d", I can see it is "Hit" by "apt update", but still no pgadmin4 installation candidate found.

It looks like focal (20.04) is simply not currently supported (although multiple articles indicate it was at one point). Earlier versions are all there. Alas, trying to install them leads to the requirement of python3-psyco2 < 2.8, but 2.8 is the focal version. Perhaps a build fail caused it to drop from repos, or an upstream version change is causing a problem... it's beyond me at this point...

Anyway, I'm not up to working that hard for it... so it's our good old friend "psql" for me right now :-)

Tengam
  • 41
  • 3
3

As of 21/05/2020 there is no pgAdmin-4 package in Ubuntu 20.04.

Another way to run pgAdmin-4 is by using Docker

docker pull dpage/pgadmin4
docker run -p 5050:80 -e "PGADMIN_DEFAULT_EMAIL=XXXX@Xmail.com" -e "PGADMIN_DEFAULT_PASSWORD=thirumal" -d dpage/pgadmin4

Then access the pgadmin4 using URL http://localhost:5050 with user name and password.

Docker image URL: https://hub.docker.com/r/dpage/pgadmin4/

Documentation URL: https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html

Full set up guide https://github.com/M-Thirumal/installation_guide/blob/master/pgadmin4/install_pgadmin4_using_docker.md

Thirumal
  • 8,280
  • 11
  • 53
  • 103
2

Check out the discussion on ask ubuntu, they explain the issue and how you can work around it. It's because PGAdmin4 lacks support for Python 3.8, as you can see on Pypi.

You'll either need to wait until a compatible release for Ubuntu 20.04 and Python 3.8 is published or work around it by installing PGAdmin in a Python 3.7 environment via something like virtualenv, conda or Docker.

LyteFM
  • 895
  • 8
  • 12
1

Now it is supported and is available in the focal repo.

0

While I know it's frustrating when things stop working, I believe version 3 has been back ported. I was able to install it as a test on my 20.04 workstation without any trouble.

  • Welcome to StackOverflow, add some more description and code if it's required to understand the answer because it will resolve Someone problem ASAP. – Nensi Kasundra May 12 '20 at 10:47
0

You can also use docker-compose by creating a docker-compose.yaml as follows

version: '3'

services:
  pgadmin:
    container_name: pgadmin
    image: dpage/pgadmin4:latest
    restart: always
    ports:
      - 8082:80
    environment:
      - PGADMIN_DEFAULT_EMAIL=dev@pgadmin.org
      - PGADMIN_DEFAULT_PASSWORD=password

and running docker-compose up.

Make sure you have docker-compose installed if you are going to use this method.

jsbroks
  • 530
  • 6
  • 15