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
6
Answers
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.
For the first time after running pgadmin4, you’ll be asked to set the email and password.
Adding to what Shashank outlined using PGAdmin Python virtual environment and run thru web browser.
You can also use Docker to install pgadmin4 on Ubuntu 22.04:
To install docker: https://docs.docker.com/engine/install/ubuntu/
Documentation for container deployment: https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html#examples
I had a similar problem and couldn’t find any solution for the desktop version, in particular, for Ubuntu 22.04 (jammy). However, this should also work for the pgadmin4-web:
(Don’t forget to run
sudo /usr/pgadmin4/bin/setup-web.sh
after that)For the desktop version just install
pgadmin4-desktop
instead ofpgadmin4-web
:Also, please note that this is a temporary solution (May 2022), until the devs release the final pgadmin4 version for jammy. Once it’s out, you would just need to update the repository.
Hope this helps.
I found the solution to this problem and is necessary to install python3.8 in the new OS Linux versions has python3.10.
Install Python3.8
Run the following commands as root or user with sudo access to update the packages list and install the prerequisites:
Add the deadsnakes PPA to your system’s sources list:
When prompted press Enter to continue:
Press [ENTER] to continue or Ctrl-c to cancel adding it.
Once the repository is enabled, install Python 3.8 with:
Verify that the installation was successful by typing:
Run finally
TL;DR;
For some reason installing just pgadmin4-web or pgadmin4-desktop does NOT install pgadmin4-server and you need first to install it like (for desktop):
sudo apt install pgadmin4-server pgadmin4-desktop
Long(er) version:
After upgrading to Ubuntu 22.04 (from 20.04) pgAdmin stopped working. There were some problems with older python version (3.8), tried to fix them in various ways but at the end gave up and just purged pgadmin4. After installing just pgadmin4-desktop package (which depends on pgadmin4 package) I found out that the installation is not full, i.e. missing files and dirs from /usr/pgadmin4. After installing the pgadmin4-server package everything started to work as expected. Hope this helps someone because I’ve wasted several hours investigating this gd issue.