6

I'm running Linux Mint 19 Tara, and trying to follow the instructions here with the goal of installing pgAdmin4 as a desktop app. There seems to be a problem involving the authentication of the repository.

The apt-key step seems to work, as I observe PostgreSQL Debian Repository in the apt-key list.

I don't have a deb command (I imagine this is a Mint vs Ubuntu difference?), so I used
add-apt-repository http://apt.postgresql.org/pub/repos/apt/ tara-pgdg main
instead, after which I observe
deb http://apt.postgresql.org/pub/repos/apt/ bionic main
in /etc/apt/sources.list.d/additional-repositories.list.

At this point running either apt-get upgrade or apt-get update shows an error
The repository 'http://apt.postgresql.org/pub/repos/apt bionic Release' does not have a Release file.

How can I proceed? It seems unlikely that there really isn't a release file; I can see what looks like an authentication list at https://apt.postgresql.org/pub/repos/apt/dists/bionic-pgdg/. Do I have a path wrong or something?

1
  • Queued by @sabbir-ahmed's answer, I see that the problem was that tara-pgdg in the add-apt-repository command was getting mapped to or replaced by bionic; it should have been bionic-pgdg. Sep 9, 2018 at 22:58

3 Answers 3

10
  1. Open terminal and type:

     wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
    
  2. Open Software Sources and click on "Additional repositories" and paste the following for Linux Mint 19 (it's based on Ubuntu Bionic):

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

    or the following for Linux Mint 20 (based on Ubuntu Focal Fossa):

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

it should look like this: enter image description here

Press "OK" and that will automatically update cache.

  1. Now open terminal and type the following:

     sudo apt update
     sudo apt install pgadmin4
    

That should install pgadmin4.

6
  • 2
    I get malformed input, repository not added when I do this on Mint 19.1. Instead, I followed these instructions inserting bionic to replace stretch in the example given.
    – LondonRob
    May 13, 2019 at 13:04
  • wiki.postgresql.org/wiki/Apt Use URL for repo from here.. May 15, 2019 at 20:00
  • for mint 18 I had to use xenial instead of bionic Aug 29, 2019 at 16:51
  • Would this work on Linux mint 20?
    – Arya
    Jul 26, 2020 at 21:17
  • A word of caution: I copied the repository URL from this post. However, by accident the copied string included a leading whitespace. When that happens, the Software Sources will complain about the "malformed URL". Be sure to copy the string exactly. Sep 25, 2020 at 8:46
5

The following worked for me in Linux Mint 19.1 modified from docs because my machine had $(lsb_release -cs) returning tessa which was not working but bionic was working.

Setup the repository

Install the public key for the repository (if not done previously):

curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add

Create the repository configuration file:

sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/bionic pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'

Install pgAdmin

Install for both desktop and web modes:

sudo apt install pgadmin4

1
  • 2
    I used "focal" instead of "bionic" for Linux Mint 20.x.
    – Regisz
    Apr 14, 2021 at 7:24
1

Python approach always work

$ sudo mkdir /var/lib/pgadmin
$ sudo mkdir /var/log/pgadmin
$ sudo chown $USER /var/lib/pgadmin
$ sudo chown $USER /var/log/pgadmin
$ python3 -m venv pgadmin4
$ source pgadmin4/bin/activate
(pgadmin4) $ pip install pgadmin4

(pgadmin4) $ pgadmin4

or

curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add

sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal/ pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'

sudo apt install pgadmin4
1
  • Thanks. I used the second set of instructions and finally got pgadmin4 installed on my computer.
    – njs
    May 4, 2022 at 3:28

You must log in to answer this question.

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