1

Ubuntu 20.04 Focal

Trying to install pgAdmin4 for postgresql.

sudo apt-get install -f pgadmin4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 pgadmin4 : Depends: libpython3.7 (>= 3.7.0) but it is not installable
E: Unable to correct problems, you have held broken packages.

I already have libpython3.8 installed, so why doesn't apt recognize it?

sudo apt-get install libpython3.8
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libpython3.8 is already the newest version (3.8.2-1ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

apt-cache policy pgadmin4
pgadmin4:
  Installed: (none)
  Candidate: 4.18-1.pgdg19.10+1
  Version table:
     4.18-1.pgdg19.10+1 500
        500 http://apt.postgresql.org/pub/repos/apt eoan-pgdg/main amd64 Packages
4
  • sudo dpkg --configure -a returns nothing.
    – F.A.N.G.
    Apr 24, 2020 at 16:02
  • Please add results of apt-cache policy pgadmin4 as there is no such package in any of the Ubuntu repos
    – doug
    Apr 24, 2020 at 17:10
  • @doug Added results. pgAdmin4 is from postgresql's own apt repository. Specifically from deb http://apt.postgresql.org/pub/repos/apt/ eoan-pgdg main and not their focal main package. Their focal support does not have pgAdmin4 yet, which is why I get it from their eoan packages.
    – F.A.N.G.
    Apr 24, 2020 at 17:16
  • Your eaon package depends on libpython3.7, that package doesn't exist in focal, it has a package named libpython3.8. The >= only refers to version of libpython3.7 as in 3.7.x . You'll need to wait for focal builds using libpython3.8
    – doug
    Apr 25, 2020 at 5:25

2 Answers 2

0

As workaround, you can install pgadmin4 from sources, here is some details: https://askubuntu.com/a/1231676/1073281

0

I saw that a lot of peophe has been the same trouble (including me), so I researched by solution and decided use the pgadmin4 through docker instead make a workaround. I suggest that you use the pgadmin4 with docker on this moment. Follow the steps bellow in terminal:

--install the docker on Ubuntu focal
$ sudo apt install docker.io
--Download the image $ sudo docker pull dpage/pgadmin4
--Run the image $ sudo docker run -p 80:80 --name=pgadmin -e "[email protected]" -e "PGADMIN_DEFAULT_PASSWORD=your_password" -d dpage/pgadmin4
--See the container status $ sudo docker ps -a

So open the web browser and use: http://localhost

In first time you must fill with e-mail defined in PGADMIN_DEFAULT_EMAIL and the password definde in PGADMIN_DEFAULT_PASSWORD.

In other times the pgAdmin4 Dashboard screen will be shown and you don't need put the e-mail and password again.

Enjoy !

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .