The repository does not have a Release file – pgAdmin4 on Mint Linux

If you’re using Ubuntu based distro and you’re trying to install pgAdmin4 from the official site (https://www.pgadmin.org/download/pgadmin-4-apt/) do not just blindly copy and paste commands.

One of them will add a new repo in /etc/apt/sources.list.d/ but instead of available Ubuntu repos it will add your Mint version name which doesn’t exist:

sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/packages-pgadmin-org.gpg] https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'

In my case

echo $(lsb_release -cs)

returns “una” so the source will be https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/una

This will lead to the next error

Err:18 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/una pgadmin4 Release                                 
  404  Not Found [IP: 87.238.57.227 443]
Get:19 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]                  
Reading package lists... Done       
E: The repository 'https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/una 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.

The solution is to open

/etc/apt/sources.list.d/pgadmin4.list

replace una with focal.

Download (again) package information from all configured sources with

sudo apt update

and install pgadmin4 with

sudo apt install pgadmin4

Note: This will install both desktop and web modes. In case you want only desktop or web you can use the next commands:

Install for desktop mode only:

sudo apt install pgadmin4-desktop

Install for web mode only:

sudo apt install pgadmin4-web 
sudo /usr/pgadmin4/bin/setup-web.sh

The last command will configure the webserver for pgadmin4-web

2 thoughts on “The repository does not have a Release file – pgAdmin4 on Mint Linux

Leave a Reply

Your email address will not be published. Required fields are marked *