Basically, follow the steps as outlined here: https://wiki.postgresql.org/wiki/Apt.
sudo apt-get install curl ca-certificates gnupg
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
sudo apt-get update
sudo apt-get install pgadmin4
(The actual command for the last step includes postgresql-11
. I never do that because I just want pgadmin4
and have never had issues with it working properly.)
Anyway, this is what happens when trying to install:
Reading package lists... Done
Building dependency tree
Reading state information... Done
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
I've redone the steps with the same result.
I did also try to do the following, but it requires python3.7
which I'm not going to install.
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt eoan-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
Verified focal
shows up at apt.postgresql.org
:
Kind of stumped after that as to what to do.
Suggestions?
I was able to install pgadmin4 on ubuntu 20.04 (focal fossa) using the following article as a base: https://linuxhint.com/install-pgadmin4-ubuntu/
A few changes to the instructions are required:
In part 2:
In part 5:
The latest version for the moment is:
(I used release, not a daily snapshot)
In part 6: Use
In part 7:
Use 'python3.8' instead of 'python2.7'
That's all.
Worked for me.
Update: Please note that it's possible install pgadmin4 (4.21) directly from the repositories now.
The problem of the upstream debian repository was the python 3.8 support. They said that was fixed in this commit, but they are apparently missing this: https://github.com/postgres/pgadmin4/commit/b7dad25d3eb29fae05fef4f161dea644f080276f
Also the upstream has no support for Ubuntu 20.04 yet. See the status at this date (2020-05-13): https://www.postgresql.org/ftp/pgadmin/pgadmin4/snapshots/
If someone were to distribute pgadmin4 directly in Ubuntu it would be really helpfully, but it is not available yet.
As a workaround you could run pgadmin4 in docker
Then point your browser to
http://localhost:5050