Created
August 4, 2022 05:12
-
-
Save dweldon/cfe080d7cc189df3217dcc1c15ae96db to your computer and use it in GitHub Desktop.
Install pgAdmin 4 on Ubuntu without using apt-key (22.04)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# https://askubuntu.com/questions/1286545/ | |
# https://www.pgadmin.org/download/pgadmin-4-apt/ | |
gpg_file="pgadmin4.gpg" | |
wget https://www.pgadmin.org/static/packages_pgadmin_org.pub | |
gpg --no-default-keyring --keyring ./temp-keyring.gpg --import packages_pgadmin_org.pub | |
gpg --no-default-keyring --keyring ./temp-keyring.gpg --export --output "${gpg_file}" | |
rm temp-keyring.* | |
rm packages_pgadmin_org.pub | |
sudo chown root:root "${gpg_file}" | |
sudo mv "${gpg_file}" /etc/apt/keyrings/ | |
echo "deb [signed-by=/etc/apt/keyrings/${gpg_file}] https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" | sudo tee /etc/apt/sources.list.d/pgadmin4.list | |
sudo apt-get update | |
# Choose one of pgadmin4, pgadmin4-desktop, pgadmin4-web | |
sudo apt-get install -y pgadmin4-desktop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment