Home > Blockchain >  installing pgadmin4-web on ubuntu desktop 22.04
installing pgadmin4-web on ubuntu desktop 22.04

Time:04-30

I have followed this tutorial for installing pgadmin4-web: pgAdmin 4 (APT) .

When I run the following command

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

I get the following error:

Setting up pgAdmin 4 in web mode on a Debian based platform… Creating configuration database… /usr/pgadmin4/bin/setup-web.sh: line 75: /usr/pgadmin4/venv/bin/python3: No such file or directory Error setting up server mode. Please examine the output above.

Any help would be great thanks.

Note:

After run the following command (tutorial´s step two)

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'

I had to change inside file /etc/apt/sources.list.d/pgadmin4.list from jammy to bionic

from
deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/jammy pgadmin4 main
to
deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/bionic pgadmin4 main

CodePudding user response:

I managed to install pgadmin4 from APT on Ubuntu 22.04, but even after that I was facing some issues while starting pgadmin4.

So I found out that there's a python package for pgadmin4 which exists. It will install the web version of the pgadmin4 and it works without any issue.

Follow the below steps to install or you can check this link.

$ sudo mkdir /var/lib/pgadmin
$ sudo mkdir /var/log/pgadmin
$ sudo chown $USER /var/lib/pgadmin
$ sudo chown $USER /var/log/pgadmin

# Create virtual environment
$ python3 -m venv pgadmin4
$ source pgadmin4/bin/activate

# Install pgadmin4
(pgadmin4) $ pip install pgadmin4

# Start pgadmin4
(pgadmin4) $ pgadmin4

For the first time after running pgadmin4, you'll be asked to set the email and password.

CodePudding user response:

Adding to what Shashank outlined using PGAdmin Python virtual environment and run thru web browser.

  1. Follow guidance here
  2. To re-start PGAdmin, from terminal run

$ source pgadmin4/bin/activate
$ pgadmin4

  1. Navigate to http://127.0.0.1:5050 in browser (keep terminal open)
  • Related