Score:1

Can't install pgadmin4 on Ubuntu 21.10 / SOLVED with how to make a terminal command alias

ru flag

Alright folks, going a bit crazy here.

I'm running Ubuntu 21.10 impish off of an external ssd. Things are working well, trying to install pgadmin4 by following the guide here:

https://www.pgadmin.org/download/pgadmin-4-apt/

namely, adding the extra the PPA , updating the apt repository, and then installing with apt:


# Setup the repository
#

# Install the public key for the repository (if not done previously):
sudo 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/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'

#
# Install pgAdmin
#

# Install for both desktop and web modes:
sudo apt install pgadmin4

# Install for desktop mode only:
sudo apt install pgadmin4-desktop

# Install for web mode only: 
sudo apt install pgadmin4-web 

# Configure the webserver, if you installed pgadmin4-web:
sudo /usr/pgadmin4/bin/setup-web.sh

^ note these are the official instructions from pgadmin.org, which says it has support for Ubuntu 21.10 (Impish, from v6.2) (I don't know what the v6.2 means, but whatever)

It appears that everything installs, and then when I try running $ pgadmin4 , nothing happens

I tried manually specifying amd64 architiecture and even switching to the LTS focal endpoint using $ sudo vim /etc/apt/sources.list.d/pgadmin4.list, changing

deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/impish pgadmin4 main

to

deb [arch=amd64] https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4 main

Still no joyy....what am I missing here? and Ideally, how would I do it all in an automated script? Setting up a new system, and wrestling with stuff like this is never enjoyable.

UPDATE: Turns out it was installed (I would have seen it if I had just pushed the Super key and searched for it). But to make a terminal command, you have to look for the path to the executable and make a custom alias. Accepted answer gives a good description of how you might generally do that

David avatar
cn flag
I would be asking this of the pgadmin.org people.
ru flag
@David fair enough, emailing the pgadmin support mailing list now, but just wondering if any other users of 21.10 can replicate this issue
Score:1
zw flag

Looking into installed files by

dpkg -S pgadmin4 | grep pgadmin4$

giving the following clues

pgadmin4-desktop: /usr/pgadmin4/bin/pgadmin4
pgadmin4-web, pgadmin4-desktop, pgadmin4-server: /usr/pgadmin4

It also should be noted that PgAdmin 4 desktop file in /usr/share/applications/pgadmin4.desktop contains Exec=/usr/pgadmin4/bin/pgadmin4.

So after following README you can run PgAdmin 4 using /usr/pgadmin4/bin/pgadmin4 command.

ru flag
Thank you for the answer @N0rbert -- feel a little silly in retrospect. I had set up it to work on WSL2 on the Windows side, and I forgot it didn't just come for free. Appreciate you also explaining some tools that I can use if I need to poke around installation stuff in the future!
ru flag
how did you learn about the -S switch of dpkg? I just checked the man file and didn't find an explanation for it
N0rbert avatar
zw flag
See https://manpages.debian.org/bullseye/dpkg/dpkg.1.en.html#S about `-S`.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.