Обсуждение: installation not working for Ubuntu 21.10 impish

Поиск
Список
Период
Сортировка

installation not working for Ubuntu 21.10 impish

От
Garrett Simpson
Дата:
Hi there, 

I'd like to report what appears to be a bug in the installation process for pgadmin4 on Ubuntu 21.10 . Below is copy and pasted from my question on askubuntu, https://askubuntu.com/questions/1395499/cant-install-pgadmin4-on-ubuntu-21-10-impish-pgadmin4

I'm running Ubuntu 21.10 impish from 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.

Re: installation not working for Ubuntu 21.10 impish

От
Dave Page
Дата:
Hi

On Wed, 2 Mar 2022 at 14:37, Garrett Simpson <elgaricimo@gmail.com> wrote:
Hi there, 

I'd like to report what appears to be a bug in the installation process for pgadmin4 on Ubuntu 21.10 . Below is copy and pasted from my question on askubuntu, https://askubuntu.com/questions/1395499/cant-install-pgadmin4-on-ubuntu-21-10-impish-pgadmin4

I'm running Ubuntu 21.10 impish from 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.


If you just run 'pgadmin4', I would expect to see a command not found error, e.g.

dpage@ubuntu:~$ pgadmin4
pgadmin4: command not found

However, the full path should work, e.g.

dpage@ubuntu:~$ /usr/pgadmin4/bin/pgadmin4
[9496:9496:0302/085252.960815:ERROR:sandbox_linux.cc(379)] InitializeSandbox() called with multiple threads in process gpu-process.
[9463:9491:0302/085255.439901:ERROR:chrome_browser_main_extra_parts_metrics.cc(227)] START: ReportBluetoothAvailability(). If you don't see the END: message, this is crbug.com/1216328.
[9463:9491:0302/085255.440023:ERROR:chrome_browser_main_extra_parts_metrics.cc(230)] END: ReportBluetoothAvailability()
[9497:9509:0302/085258.416653:ERROR:cert_verify_proc_builtin.cc(603)] No net_fetcher for performing AIA chasing.
[9497:9514:0302/085300.895407:ERROR:cert_verify_proc_builtin.cc(603)] No net_fetcher for performing AIA chasing.
[9497:9514:0302/085332.999213:ERROR:cert_verify_proc_builtin.cc(603)] No net_fetcher for performing AIA chasing.
[9497:9514:0302/085353.520635:ERROR:cert_verify_proc_builtin.cc(603)] No net_fetcher for performing AIA chasing.

Those errors can be ignored - they're garbage the Chrome engine spits out that are merely annoying. You should see the pgAdmin window open at this point.

You can also run pgAdmin from the Wayland menu. Just type pgadmin in the search box if the icon doesn't show up immediately.

FYI, the testing above was done on a fresh installation of Ubuntu 21.10.

--

Re: installation not working for Ubuntu 21.10 impish

От
Garrett Simpson
Дата:
Thanks so much Dave -- silly oversight on my part in retrospect.  Humble request though to add the executable to the PATH upon installation so you get it for free.

Also another question....

when trying to open pgadmin4, I see the window popup, and after waiting a while (seeing "This is taking longer than usual" and "Almost there"),  another box comes up saying  


"The pgAdmin 4 server could not be contacted:"

and it spits out the following environment information... any suggestions?  I made sure postgres was running by doing
$ sudo service postgresql start

and still no luck...
error says 
Failed to launch pgAdmin4. Error:
Error: spawn /usr/pgadmin4/venv/bin/python3 ENOENT



pgAdmin Runtime Environment
--------------------------------------------------------
Python Path: "/usr/pgadmin4/venv/bin/python3"
Runtime Config File: "/home/garrett/.config/pgadmin/runtime_config.json"
pgAdmin Config File: "/usr/pgadmin4/web/config.py"
Webapp Path: "/usr/pgadmin4/web/pgAdmin4.py"
pgAdmin Command: "/usr/pgadmin4/venv/bin/python3 -s /usr/pgadmin4/web/pgAdmin4.py"
Environment:
  - GJS_DEBUG_TOPICS: JS ERROR;JS LOG
  - USER: garrett
  - XDG_SESSION_TYPE: wayland
  - SHLVL: 0
  - HOME: /home/garrett
  - DESKTOP_SESSION: ubuntu
  - GIO_LAUNCHED_DESKTOP_FILE: /usr/share/applications/pgadmin4.desktop
  - GTK_MODULES: gail:atk-bridge
  - GNOME_SHELL_SESSION_MODE: ubuntu
  - MANAGERPID: 1860
  - SYSTEMD_EXEC_PID: 2012
  - DBUS_SESSION_BUS_ADDRESS: unix:path=/run/user/1000/bus
  - GIO_LAUNCHED_DESKTOP_FILE_PID: 7732
  - IM_CONFIG_PHASE: 1
  - WAYLAND_DISPLAY: wayland-0
  - LOGNAME: garrett
  - _: /usr/bin/gnome-session
  - JOURNAL_STREAM: 8:35085
  - XDG_SESSION_CLASS: user
  - USERNAME: garrett
  - GNOME_DESKTOP_SESSION_ID: this-is-deprecated
  - PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
  - SESSION_MANAGER: local/garrett-external:@/tmp/.ICE-unix/1994,unix/garrett-external:/tmp/.ICE-unix/1994
  - INVOCATION_ID: bfafbc8cf87c44b3a86bc5cc8f90c3db
  - XDG_RUNTIME_DIR: /run/user/1000
  - XDG_MENU_PREFIX: gnome-
  - GNOME_SETUP_DISPLAY: :1
  - DISPLAY: :0
  - LANG: en_US.UTF-8
  - XDG_CURRENT_DESKTOP: ubuntu:GNOME
  - XDG_SESSION_DESKTOP: ubuntu
  - XMODIFIERS: @im=ibus
  - XAUTHORITY: /run/user/1000/.mutter-Xwaylandauth.5AZ8H1
  - SSH_AGENT_LAUNCHER: gnome-keyring
  - SSH_AUTH_SOCK: /run/user/1000/keyring/ssh
  - SHELL: /bin/bash
  - QT_ACCESSIBILITY: 1
  - GDMSESSION: ubuntu
  - GJS_DEBUG_OUTPUT: stderr
  - QT_IM_MODULE: ibus
  - PWD: /home/garrett
  - XDG_DATA_DIRS: /usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
  - XDG_CONFIG_DIRS: /etc/xdg/xdg-ubuntu:/etc/xdg
  - GDK_BACKEND: x11
  - NO_AT_BRIDGE: 1
  - PGADMIN_INT_PORT: 35873
  - PGADMIN_INT_KEY: d59e0765-b67e-4cb0-b5f1-5c752517b6cc
  - PGADMIN_SERVER_MODE: OFF
--------------------------------------------------------

Failed to launch pgAdmin4. Error:
Error: spawn /usr/pgadmin4/venv/bin/python3 ENOENT

On Wed, Mar 2, 2022 at 11:57 AM Dave Page <dpage@pgadmin.org> wrote:
Hi

On Wed, 2 Mar 2022 at 14:37, Garrett Simpson <elgaricimo@gmail.com> wrote:
Hi there, 

I'd like to report what appears to be a bug in the installation process for pgadmin4 on Ubuntu 21.10 . Below is copy and pasted from my question on askubuntu, https://askubuntu.com/questions/1395499/cant-install-pgadmin4-on-ubuntu-21-10-impish-pgadmin4

I'm running Ubuntu 21.10 impish from 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.


If you just run 'pgadmin4', I would expect to see a command not found error, e.g.

dpage@ubuntu:~$ pgadmin4
pgadmin4: command not found

However, the full path should work, e.g.

dpage@ubuntu:~$ /usr/pgadmin4/bin/pgadmin4
[9496:9496:0302/085252.960815:ERROR:sandbox_linux.cc(379)] InitializeSandbox() called with multiple threads in process gpu-process.
[9463:9491:0302/085255.439901:ERROR:chrome_browser_main_extra_parts_metrics.cc(227)] START: ReportBluetoothAvailability(). If you don't see the END: message, this is crbug.com/1216328.
[9463:9491:0302/085255.440023:ERROR:chrome_browser_main_extra_parts_metrics.cc(230)] END: ReportBluetoothAvailability()
[9497:9509:0302/085258.416653:ERROR:cert_verify_proc_builtin.cc(603)] No net_fetcher for performing AIA chasing.
[9497:9514:0302/085300.895407:ERROR:cert_verify_proc_builtin.cc(603)] No net_fetcher for performing AIA chasing.
[9497:9514:0302/085332.999213:ERROR:cert_verify_proc_builtin.cc(603)] No net_fetcher for performing AIA chasing.
[9497:9514:0302/085353.520635:ERROR:cert_verify_proc_builtin.cc(603)] No net_fetcher for performing AIA chasing.

Those errors can be ignored - they're garbage the Chrome engine spits out that are merely annoying. You should see the pgAdmin window open at this point.

You can also run pgAdmin from the Wayland menu. Just type pgadmin in the search box if the icon doesn't show up immediately.

FYI, the testing above was done on a fresh installation of Ubuntu 21.10.

--

Re: installation not working for Ubuntu 21.10 impish

От
Garrett Simpson
Дата:
Doing more research...CAME UP WITH A WORK AROUND!  But I definitely think that pgadmin4 just doesn't work with Ubuntu 21.10 out of the box.  Dave, can you confirm?

TLDR:  Need to install python 3.8 for pgadmin to work with Ubuntu 21.10.  Easiest way to do this is via the deadsnakes ppa and some temporary changing of the main repos to point at bionic.



The problem stems from the symlink being broken.  If I check out the directory housing the python3 symlink that the environment is using...

~$  cd /usr/pgadmin4/venv/bin
/usr/pgadmin4/venv/bin$ ls -l

I see the following 2 symlinks are broken:
lrwxrwxrwx 1 root root    7 Feb  7 11:20 python -> python3
lrwxrwxrwx 1 root root   18 Feb  7 11:20 python3 -> /usr/bin/python3.8

because when I run `$ which python3`, i get back
/usr/bin/python3

Follow this Unix stack exchange post, https://unix.stackexchange.com/questions/151999/how-to-change-where-a-symlink-points, I fix the symlink with the following command while in that same directory:

/usr/pgadmin4/venv/bin$ sudo ln -sf /usr/bin/python3 python3

That seems to fix the symlink issue, but now I get a new error:
*************************
Traceback (most recent call last):
  File "/usr/pgadmin4/web/pgAdmin4.py", line 39, in <module>
    import config
  File "/usr/pgadmin4/web/config.py", line 25, in <module>
    from pgadmin.utils import env, IS_WIN, fs_short_path
  File "/usr/pgadmin4/web/pgadmin/__init__.py", line 23, in <module>
    from flask import Flask, abort, request, current_app, session, url_for
ModuleNotFoundError: No module named 'flask'
*********************

After more digging I realize there seem to be broken symlinks everywhere ( which you can see with $ cd /usr/pgadmin4/venv/lib/python3.8 && ls -l )

So I figure I should try and revert my "fixed" symlink, and install python 3.8 from the deadsnakes ppa.  To do this I'll have to change the deadsnakes url in the sources.list.d directory to target bionic and focal, following https://brennan.io/2021/06/21/deadsnakes-hirsute/  :

  $  cd /usr/pgadmin4/venv/bin && sudo ln -sf /usr/bin/python3.8 python3
  $  sudo add-apt-repository ppa:deadsnakes
  $ sudo vim /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-impish.list
  $ sudo apt update && sudo apt install python3.8

This almost works, but it looks like I may be entering dependency hell...I get the following message:

*********************
The following packages have unmet dependencies:
 python3.8 : Depends: libpython3.8-stdlib (= 3.8.12-1+bionic3) but it is not installable
E: Unable to correct problems, you have held broken packages.
*********************

So I try adding the bionic universe repo into my main sources.list:
  $ sudo vim /etc/apt/sources.list
      --->  add 'deb http://us.archive.ubuntu.com/ubuntu/ bionic universe' under 'deb http://us.archive.ubuntu.com/ubuntu/ impish universe'

And try again

$ sudo apt update && sudo apt install python3.8

hit with a keyring error: 

****************
W: GPG error: http://us.archive.ubuntu.com/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32
E: The repository 'http://us.archive.ubuntu.com/ubuntu bionic InRelease' is not signed.
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.
****************

so following https://askubuntu.com/questions/13065/how-do-i-fix-the-gpg-error-no-pubkey  , I add the key
$  sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32

and try again....still doesn't work. 

***************
python3.8 : Depends: libpython3.8-stdlib (= 3.8.12-1+bionic3) but it is not installable
*****************

Hail mary, try to temporarily change all my main sources to focal and try again, also delete that bionic line:
$  sudo sed -i 's/impish/focal/g' /etc/apt/sources.list
$  sudo apt update && sudo apt install python3.8

Still gives 
***************
python3.8 : Depends: libpython3.8-stdlib (= 3.8.12-1+bionic3) but it is not installable
*****************

So I try again, but changing everything to bionic:
$  sudo sed -i 's/focal/bionic/g' /etc/apt/sources.list
$  sudo apt update && sudo apt install python3.8


THIS WORKS! Python 3.8 officially installed where pgadmin is expecting it:
$ ls /usr/bin/ | grep python
-->
python3
python3.8
python3.9


and running it works


On Wed, Mar 2, 2022 at 6:55 PM Garrett Simpson <elgaricimo@gmail.com> wrote:
Thanks so much Dave -- silly oversight on my part in retrospect.  Humble request though to add the executable to the PATH upon installation so you get it for free.

Also another question....

when trying to open pgadmin4, I see the window popup, and after waiting a while (seeing "This is taking longer than usual" and "Almost there"),  another box comes up saying  


"The pgAdmin 4 server could not be contacted:"

and it spits out the following environment information... any suggestions?  I made sure postgres was running by doing
$ sudo service postgresql start

and still no luck...
error says 
Failed to launch pgAdmin4. Error:
Error: spawn /usr/pgadmin4/venv/bin/python3 ENOENT



pgAdmin Runtime Environment
--------------------------------------------------------
Python Path: "/usr/pgadmin4/venv/bin/python3"
Runtime Config File: "/home/garrett/.config/pgadmin/runtime_config.json"
pgAdmin Config File: "/usr/pgadmin4/web/config.py"
Webapp Path: "/usr/pgadmin4/web/pgAdmin4.py"
pgAdmin Command: "/usr/pgadmin4/venv/bin/python3 -s /usr/pgadmin4/web/pgAdmin4.py"
Environment:
  - GJS_DEBUG_TOPICS: JS ERROR;JS LOG
  - USER: garrett
  - XDG_SESSION_TYPE: wayland
  - SHLVL: 0
  - HOME: /home/garrett
  - DESKTOP_SESSION: ubuntu
  - GIO_LAUNCHED_DESKTOP_FILE: /usr/share/applications/pgadmin4.desktop
  - GTK_MODULES: gail:atk-bridge
  - GNOME_SHELL_SESSION_MODE: ubuntu
  - MANAGERPID: 1860
  - SYSTEMD_EXEC_PID: 2012
  - DBUS_SESSION_BUS_ADDRESS: unix:path=/run/user/1000/bus
  - GIO_LAUNCHED_DESKTOP_FILE_PID: 7732
  - IM_CONFIG_PHASE: 1
  - WAYLAND_DISPLAY: wayland-0
  - LOGNAME: garrett
  - _: /usr/bin/gnome-session
  - JOURNAL_STREAM: 8:35085
  - XDG_SESSION_CLASS: user
  - USERNAME: garrett
  - GNOME_DESKTOP_SESSION_ID: this-is-deprecated
  - PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
  - SESSION_MANAGER: local/garrett-external:@/tmp/.ICE-unix/1994,unix/garrett-external:/tmp/.ICE-unix/1994
  - INVOCATION_ID: bfafbc8cf87c44b3a86bc5cc8f90c3db
  - XDG_RUNTIME_DIR: /run/user/1000
  - XDG_MENU_PREFIX: gnome-
  - GNOME_SETUP_DISPLAY: :1
  - DISPLAY: :0
  - LANG: en_US.UTF-8
  - XDG_CURRENT_DESKTOP: ubuntu:GNOME
  - XDG_SESSION_DESKTOP: ubuntu
  - XMODIFIERS: @im=ibus
  - XAUTHORITY: /run/user/1000/.mutter-Xwaylandauth.5AZ8H1
  - SSH_AGENT_LAUNCHER: gnome-keyring
  - SSH_AUTH_SOCK: /run/user/1000/keyring/ssh
  - SHELL: /bin/bash
  - QT_ACCESSIBILITY: 1
  - GDMSESSION: ubuntu
  - GJS_DEBUG_OUTPUT: stderr
  - QT_IM_MODULE: ibus
  - PWD: /home/garrett
  - XDG_DATA_DIRS: /usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
  - XDG_CONFIG_DIRS: /etc/xdg/xdg-ubuntu:/etc/xdg
  - GDK_BACKEND: x11
  - NO_AT_BRIDGE: 1
  - PGADMIN_INT_PORT: 35873
  - PGADMIN_INT_KEY: d59e0765-b67e-4cb0-b5f1-5c752517b6cc
  - PGADMIN_SERVER_MODE: OFF
--------------------------------------------------------

Failed to launch pgAdmin4. Error:
Error: spawn /usr/pgadmin4/venv/bin/python3 ENOENT

On Wed, Mar 2, 2022 at 11:57 AM Dave Page <dpage@pgadmin.org> wrote:
Hi

On Wed, 2 Mar 2022 at 14:37, Garrett Simpson <elgaricimo@gmail.com> wrote:
Hi there, 

I'd like to report what appears to be a bug in the installation process for pgadmin4 on Ubuntu 21.10 . Below is copy and pasted from my question on askubuntu, https://askubuntu.com/questions/1395499/cant-install-pgadmin4-on-ubuntu-21-10-impish-pgadmin4

I'm running Ubuntu 21.10 impish from 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.


If you just run 'pgadmin4', I would expect to see a command not found error, e.g.

dpage@ubuntu:~$ pgadmin4
pgadmin4: command not found

However, the full path should work, e.g.

dpage@ubuntu:~$ /usr/pgadmin4/bin/pgadmin4
[9496:9496:0302/085252.960815:ERROR:sandbox_linux.cc(379)] InitializeSandbox() called with multiple threads in process gpu-process.
[9463:9491:0302/085255.439901:ERROR:chrome_browser_main_extra_parts_metrics.cc(227)] START: ReportBluetoothAvailability(). If you don't see the END: message, this is crbug.com/1216328.
[9463:9491:0302/085255.440023:ERROR:chrome_browser_main_extra_parts_metrics.cc(230)] END: ReportBluetoothAvailability()
[9497:9509:0302/085258.416653:ERROR:cert_verify_proc_builtin.cc(603)] No net_fetcher for performing AIA chasing.
[9497:9514:0302/085300.895407:ERROR:cert_verify_proc_builtin.cc(603)] No net_fetcher for performing AIA chasing.
[9497:9514:0302/085332.999213:ERROR:cert_verify_proc_builtin.cc(603)] No net_fetcher for performing AIA chasing.
[9497:9514:0302/085353.520635:ERROR:cert_verify_proc_builtin.cc(603)] No net_fetcher for performing AIA chasing.

Those errors can be ignored - they're garbage the Chrome engine spits out that are merely annoying. You should see the pgAdmin window open at this point.

You can also run pgAdmin from the Wayland menu. Just type pgadmin in the search box if the icon doesn't show up immediately.

FYI, the testing above was done on a fresh installation of Ubuntu 21.10.

--

Re: installation not working for Ubuntu 21.10 impish

От
Garrett Simpson
Дата:

On Thu, Mar 3, 2022 at 12:22 AM Garrett Simpson <elgaricimo@gmail.com> wrote:
Doing more research...CAME UP WITH A WORK AROUND!  But I definitely think that pgadmin4 just doesn't work with Ubuntu 21.10 out of the box.  Dave, can you confirm?

TLDR:  Need to install python 3.8 for pgadmin to work with Ubuntu 21.10.  Easiest way to do this is via the deadsnakes ppa and some temporary changing of the main repos to point at bionic.



The problem stems from the symlink being broken.  If I check out the directory housing the python3 symlink that the environment is using...

~$  cd /usr/pgadmin4/venv/bin
/usr/pgadmin4/venv/bin$ ls -l

I see the following 2 symlinks are broken:
lrwxrwxrwx 1 root root    7 Feb  7 11:20 python -> python3
lrwxrwxrwx 1 root root   18 Feb  7 11:20 python3 -> /usr/bin/python3.8

because when I run `$ which python3`, i get back
/usr/bin/python3

Follow this Unix stack exchange post, https://unix.stackexchange.com/questions/151999/how-to-change-where-a-symlink-points, I fix the symlink with the following command while in that same directory:

/usr/pgadmin4/venv/bin$ sudo ln -sf /usr/bin/python3 python3

That seems to fix the symlink issue, but now I get a new error:
*************************
Traceback (most recent call last):
  File "/usr/pgadmin4/web/pgAdmin4.py", line 39, in <module>
    import config
  File "/usr/pgadmin4/web/config.py", line 25, in <module>
    from pgadmin.utils import env, IS_WIN, fs_short_path
  File "/usr/pgadmin4/web/pgadmin/__init__.py", line 23, in <module>
    from flask import Flask, abort, request, current_app, session, url_for
ModuleNotFoundError: No module named 'flask'
*********************

After more digging I realize there seem to be broken symlinks everywhere ( which you can see with $ cd /usr/pgadmin4/venv/lib/python3.8 && ls -l )

So I figure I should try and revert my "fixed" symlink, and install python 3.8 from the deadsnakes ppa.  To do this I'll have to change the deadsnakes url in the sources.list.d directory to target bionic and focal, following https://brennan.io/2021/06/21/deadsnakes-hirsute/  :

  $  cd /usr/pgadmin4/venv/bin && sudo ln -sf /usr/bin/python3.8 python3
  $  sudo add-apt-repository ppa:deadsnakes
  $ sudo vim /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-impish.list
  $ sudo apt update && sudo apt install python3.8

This almost works, but it looks like I may be entering dependency hell...I get the following message:

*********************
The following packages have unmet dependencies:
 python3.8 : Depends: libpython3.8-stdlib (= 3.8.12-1+bionic3) but it is not installable
E: Unable to correct problems, you have held broken packages.
*********************

So I try adding the bionic universe repo into my main sources.list:
  $ sudo vim /etc/apt/sources.list
      --->  add 'deb http://us.archive.ubuntu.com/ubuntu/ bionic universe' under 'deb http://us.archive.ubuntu.com/ubuntu/ impish universe'

And try again

$ sudo apt update && sudo apt install python3.8

hit with a keyring error: 

****************
W: GPG error: http://us.archive.ubuntu.com/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32
E: The repository 'http://us.archive.ubuntu.com/ubuntu bionic InRelease' is not signed.
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.
****************

so following https://askubuntu.com/questions/13065/how-do-i-fix-the-gpg-error-no-pubkey  , I add the key
$  sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32

and try again....still doesn't work. 

***************
python3.8 : Depends: libpython3.8-stdlib (= 3.8.12-1+bionic3) but it is not installable
*****************

Hail mary, try to temporarily change all my main sources to focal and try again, also delete that bionic line:
$  sudo sed -i 's/impish/focal/g' /etc/apt/sources.list
$  sudo apt update && sudo apt install python3.8

Still gives 
***************
python3.8 : Depends: libpython3.8-stdlib (= 3.8.12-1+bionic3) but it is not installable
*****************

So I try again, but changing everything to bionic:
$  sudo sed -i 's/focal/bionic/g' /etc/apt/sources.list
$  sudo apt update && sudo apt install python3.8


THIS WORKS! Python 3.8 officially installed where pgadmin is expecting it:
$ ls /usr/bin/ | grep python
-->
python3
python3.8
python3.9


and running it works


On Wed, Mar 2, 2022 at 6:55 PM Garrett Simpson <elgaricimo@gmail.com> wrote:
Thanks so much Dave -- silly oversight on my part in retrospect.  Humble request though to add the executable to the PATH upon installation so you get it for free.

Also another question....

when trying to open pgadmin4, I see the window popup, and after waiting a while (seeing "This is taking longer than usual" and "Almost there"),  another box comes up saying  


"The pgAdmin 4 server could not be contacted:"

and it spits out the following environment information... any suggestions?  I made sure postgres was running by doing
$ sudo service postgresql start

and still no luck...
error says 
Failed to launch pgAdmin4. Error:
Error: spawn /usr/pgadmin4/venv/bin/python3 ENOENT



pgAdmin Runtime Environment
--------------------------------------------------------
Python Path: "/usr/pgadmin4/venv/bin/python3"
Runtime Config File: "/home/garrett/.config/pgadmin/runtime_config.json"
pgAdmin Config File: "/usr/pgadmin4/web/config.py"
Webapp Path: "/usr/pgadmin4/web/pgAdmin4.py"
pgAdmin Command: "/usr/pgadmin4/venv/bin/python3 -s /usr/pgadmin4/web/pgAdmin4.py"
Environment:
  - GJS_DEBUG_TOPICS: JS ERROR;JS LOG
  - USER: garrett
  - XDG_SESSION_TYPE: wayland
  - SHLVL: 0
  - HOME: /home/garrett
  - DESKTOP_SESSION: ubuntu
  - GIO_LAUNCHED_DESKTOP_FILE: /usr/share/applications/pgadmin4.desktop
  - GTK_MODULES: gail:atk-bridge
  - GNOME_SHELL_SESSION_MODE: ubuntu
  - MANAGERPID: 1860
  - SYSTEMD_EXEC_PID: 2012
  - DBUS_SESSION_BUS_ADDRESS: unix:path=/run/user/1000/bus
  - GIO_LAUNCHED_DESKTOP_FILE_PID: 7732
  - IM_CONFIG_PHASE: 1
  - WAYLAND_DISPLAY: wayland-0
  - LOGNAME: garrett
  - _: /usr/bin/gnome-session
  - JOURNAL_STREAM: 8:35085
  - XDG_SESSION_CLASS: user
  - USERNAME: garrett
  - GNOME_DESKTOP_SESSION_ID: this-is-deprecated
  - PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
  - SESSION_MANAGER: local/garrett-external:@/tmp/.ICE-unix/1994,unix/garrett-external:/tmp/.ICE-unix/1994
  - INVOCATION_ID: bfafbc8cf87c44b3a86bc5cc8f90c3db
  - XDG_RUNTIME_DIR: /run/user/1000
  - XDG_MENU_PREFIX: gnome-
  - GNOME_SETUP_DISPLAY: :1
  - DISPLAY: :0
  - LANG: en_US.UTF-8
  - XDG_CURRENT_DESKTOP: ubuntu:GNOME
  - XDG_SESSION_DESKTOP: ubuntu
  - XMODIFIERS: @im=ibus
  - XAUTHORITY: /run/user/1000/.mutter-Xwaylandauth.5AZ8H1
  - SSH_AGENT_LAUNCHER: gnome-keyring
  - SSH_AUTH_SOCK: /run/user/1000/keyring/ssh
  - SHELL: /bin/bash
  - QT_ACCESSIBILITY: 1
  - GDMSESSION: ubuntu
  - GJS_DEBUG_OUTPUT: stderr
  - QT_IM_MODULE: ibus
  - PWD: /home/garrett
  - XDG_DATA_DIRS: /usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
  - XDG_CONFIG_DIRS: /etc/xdg/xdg-ubuntu:/etc/xdg
  - GDK_BACKEND: x11
  - NO_AT_BRIDGE: 1
  - PGADMIN_INT_PORT: 35873
  - PGADMIN_INT_KEY: d59e0765-b67e-4cb0-b5f1-5c752517b6cc
  - PGADMIN_SERVER_MODE: OFF
--------------------------------------------------------

Failed to launch pgAdmin4. Error:
Error: spawn /usr/pgadmin4/venv/bin/python3 ENOENT

On Wed, Mar 2, 2022 at 11:57 AM Dave Page <dpage@pgadmin.org> wrote:
Hi

On Wed, 2 Mar 2022 at 14:37, Garrett Simpson <elgaricimo@gmail.com> wrote:
Hi there, 

I'd like to report what appears to be a bug in the installation process for pgadmin4 on Ubuntu 21.10 . Below is copy and pasted from my question on askubuntu, https://askubuntu.com/questions/1395499/cant-install-pgadmin4-on-ubuntu-21-10-impish-pgadmin4

I'm running Ubuntu 21.10 impish from 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.


If you just run 'pgadmin4', I would expect to see a command not found error, e.g.

dpage@ubuntu:~$ pgadmin4
pgadmin4: command not found

However, the full path should work, e.g.

dpage@ubuntu:~$ /usr/pgadmin4/bin/pgadmin4
[9496:9496:0302/085252.960815:ERROR:sandbox_linux.cc(379)] InitializeSandbox() called with multiple threads in process gpu-process.
[9463:9491:0302/085255.439901:ERROR:chrome_browser_main_extra_parts_metrics.cc(227)] START: ReportBluetoothAvailability(). If you don't see the END: message, this is crbug.com/1216328.
[9463:9491:0302/085255.440023:ERROR:chrome_browser_main_extra_parts_metrics.cc(230)] END: ReportBluetoothAvailability()
[9497:9509:0302/085258.416653:ERROR:cert_verify_proc_builtin.cc(603)] No net_fetcher for performing AIA chasing.
[9497:9514:0302/085300.895407:ERROR:cert_verify_proc_builtin.cc(603)] No net_fetcher for performing AIA chasing.
[9497:9514:0302/085332.999213:ERROR:cert_verify_proc_builtin.cc(603)] No net_fetcher for performing AIA chasing.
[9497:9514:0302/085353.520635:ERROR:cert_verify_proc_builtin.cc(603)] No net_fetcher for performing AIA chasing.

Those errors can be ignored - they're garbage the Chrome engine spits out that are merely annoying. You should see the pgAdmin window open at this point.

You can also run pgAdmin from the Wayland menu. Just type pgadmin in the search box if the icon doesn't show up immediately.

FYI, the testing above was done on a fresh installation of Ubuntu 21.10.

--

Re: installation not working for Ubuntu 21.10 impish

От
Dave Page
Дата:
Hi

On Thu, 3 Mar 2022 at 05:22, Garrett Simpson <elgaricimo@gmail.com> wrote:
Doing more research...CAME UP WITH A WORK AROUND!  But I definitely think that pgadmin4 just doesn't work with Ubuntu 21.10 out of the box.  Dave, can you confirm?

No, I can't. The test I did yesterday was on a brand new, fresh installation of Ubuntu 21.10. I installed it, logged in, and then copied the commands straight from your email and it worked perfectly.
 

TLDR:  Need to install python 3.8 for pgadmin to work with Ubuntu 21.10.  Easiest way to do this is via the deadsnakes ppa and some temporary changing of the main repos to point at bionic.

Except that pgAdmin builds for Ubuntu 21.10 are built against Python 3.9, the default for Impish:

dpage@ubuntu:~$ grep PRETTY_NAME /etc/os-release
PRETTY_NAME="Ubuntu 21.10"
dpage@ubuntu:~$ /usr/pgadmin4/venv/bin/python3 --version
Python 3.9.7
 
The problem stems from the symlink being broken.  If I check out the directory housing the python3 symlink that the environment is using...

~$  cd /usr/pgadmin4/venv/bin
/usr/pgadmin4/venv/bin$ ls -l

I see the following 2 symlinks are broken:
lrwxrwxrwx 1 root root    7 Feb  7 11:20 python -> python3
lrwxrwxrwx 1 root root   18 Feb  7 11:20 python3 -> /usr/bin/python3.8

Yet I see:

dpage@ubuntu:/usr/pgadmin4/venv/bin$ ls -l
total 84
-rw-r--r-- 1 root root 1893 Feb  7 08:12 activate
-rw-r--r-- 1 root root  842 Feb  7 08:12 activate.csh
-rw-r--r-- 1 root root 1982 Feb  7 08:12 activate.fish
-rw-r--r-- 1 root root 8834 Feb  7 08:12 Activate.ps1
-rwxrwxr-x 1 root root  227 Feb  7 08:12 alembic
-rwxrwxr-x 1 root root  235 Feb  7 08:12 chardetect
-rwxrwxr-x 1 root root  244 Feb  7 08:12 easy_install
-rwxrwxr-x 1 root root  244 Feb  7 08:12 easy_install-3.9
-rwxrwxr-x 1 root root  228 Feb  7 08:12 email_validator
-rwxrwxr-x 1 root root  222 Feb  7 08:12 flask
-rwxrwxr-x 1 root root  227 Feb  7 08:12 mako-render
-rwxrwxr-x 1 root root  235 Feb  7 08:12 pip
-rwxrwxr-x 1 root root  235 Feb  7 08:12 pip3
-rwxrwxr-x 1 root root  235 Feb  7 08:12 pip3.9
-rwxrwxr-x 1 root root  236 Feb  7 08:12 pybabel
lrwxrwxrwx 1 root root    7 Feb  7 08:20 python -> python3
lrwxrwxrwx 1 root root   18 Feb  7 08:20 python3 -> /usr/bin/python3.9
lrwxrwxrwx 1 root root    7 Feb  7 08:20 python3.9 -> python3
-rwxrwxr-x 1 root root  235 Feb  7 08:12 qr
-rwxrwxr-x 1 root root  230 Feb  7 08:12 sqlformat
-rwxrwxr-x 1 root root  232 Feb  7 08:12 sshtunnel
-rwxrwxr-x 1 root root  222 Feb  7 08:12 wheel

It seems pretty clear to me that you've somehow installed a build of pgAdmin for an older version of Ubuntu, one which uses Python 3.8. Based on what we currently support, that can only be Ubuntu 20.04 as that's the only Ubuntu or Debian build that uses Python 3.8.

What is in /etc/os-release on your system, and what is the output of the command:

lsb_release -cs


--

Re: installation not working for Ubuntu 21.10 impish

От
Garrett Simpson
Дата:
Hi Dave,
Appreciate the quick response!
Definitely have Impish...

garrett@garrett-external:/etc$ lsb_release -cd
Description: Ubuntu 21.10
Codename: impish

garrett@garrett-external:/etc$ lsb_release -cs
impish

But for some reason I don't have  the os-release directory:

garrett@garrett-external:/etc$ cd /etc/os-release
bash: cd: /etc/os-release: Not a directory


I think what probably happened is when I was initially stuck, and trying to run pgadmin4 from the terminal, not seeing anything happen, and thinking it was not fully installed when it was, I started monkeying around with the urls in /etc/apt/sources.list.d to try uninstalling and reinstalling past releases, following a bit too blindly things I found searching online...

garrett@garrett-external:/etc/apt/sources.list.d$ ls
deadsnakes-ubuntu-ppa-impish.list  pgadmin4.list.save  pgdg.list.save
pgadmin4.list                      pgdg.list


Looking at pgadmin4.list.save , I see I had at least tried to use hirsute 's repo:

garrett@garrett-external:/etc/apt/sources.list.d$ cat pgadmin4.list.save
    deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/hirsute pgadmin4 main

I'm thinking this is overriding the correct impish repos, so I'll try deleting that file, purging the installation and re-installing:

garrett@garrett-external:/etc/apt/sources.list.d$ ls
    deadsnakes-ubuntu-ppa-impish.list  pgadmin4.list  pgadmin4.list.save  pgdg.list  pgdg.list.save
garrett@garrett-external:/etc/apt/sources.list.d$ sudo rm pgadmin4.list.save

double check that the pgadmin4 sources are correct...
garrett@garrett-external:/etc/apt/sources.list.d$ ls
    deadsnakes-ubuntu-ppa-impish.list  pgadmin4.list  pgdg.list  pgdg.list.save
garrett@garrett-external:/etc/apt/sources.list.d$ cat pgadmin4.list
  deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4 main

^ok definitely the problem...should fix that....

garrett@garrett-external:/etc/apt/sources.list.d$ sudo sed -i 's/focal/impish/g' ./pgadmin4.list
garrett@garrett-external:/etc/apt/sources.list.d$ cat ./pgadmin4.list
  deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/impish pgadmin4 main

uninstall pgadmin4
garrett@garrett-external:/etc/apt/sources.list.d$ sudo apt purge pgadmin4
garrett@garrett-external:/etc/apt/sources.list.d$ sudo apt autoremove

reinstall pgadmin4
garrett@garrett-external:/etc/apt/sources.list.d$ sudo apt update && sudo apt install pgadmin4

And now it works fine

So you were right, apologies for the self inflicted goose chase -- but definitely learned a lot in the process!



On Thu, Mar 3, 2022 at 4:45 AM Dave Page <dpage@pgadmin.org> wrote:
Hi

On Thu, 3 Mar 2022 at 05:22, Garrett Simpson <elgaricimo@gmail.com> wrote:
Doing more research...CAME UP WITH A WORK AROUND!  But I definitely think that pgadmin4 just doesn't work with Ubuntu 21.10 out of the box.  Dave, can you confirm?

No, I can't. The test I did yesterday was on a brand new, fresh installation of Ubuntu 21.10. I installed it, logged in, and then copied the commands straight from your email and it worked perfectly.
 

TLDR:  Need to install python 3.8 for pgadmin to work with Ubuntu 21.10.  Easiest way to do this is via the deadsnakes ppa and some temporary changing of the main repos to point at bionic.

Except that pgAdmin builds for Ubuntu 21.10 are built against Python 3.9, the default for Impish:

dpage@ubuntu:~$ grep PRETTY_NAME /etc/os-release
PRETTY_NAME="Ubuntu 21.10"
dpage@ubuntu:~$ /usr/pgadmin4/venv/bin/python3 --version
Python 3.9.7
 
The problem stems from the symlink being broken.  If I check out the directory housing the python3 symlink that the environment is using...

~$  cd /usr/pgadmin4/venv/bin
/usr/pgadmin4/venv/bin$ ls -l

I see the following 2 symlinks are broken:
lrwxrwxrwx 1 root root    7 Feb  7 11:20 python -> python3
lrwxrwxrwx 1 root root   18 Feb  7 11:20 python3 -> /usr/bin/python3.8

Yet I see:

dpage@ubuntu:/usr/pgadmin4/venv/bin$ ls -l
total 84
-rw-r--r-- 1 root root 1893 Feb  7 08:12 activate
-rw-r--r-- 1 root root  842 Feb  7 08:12 activate.csh
-rw-r--r-- 1 root root 1982 Feb  7 08:12 activate.fish
-rw-r--r-- 1 root root 8834 Feb  7 08:12 Activate.ps1
-rwxrwxr-x 1 root root  227 Feb  7 08:12 alembic
-rwxrwxr-x 1 root root  235 Feb  7 08:12 chardetect
-rwxrwxr-x 1 root root  244 Feb  7 08:12 easy_install
-rwxrwxr-x 1 root root  244 Feb  7 08:12 easy_install-3.9
-rwxrwxr-x 1 root root  228 Feb  7 08:12 email_validator
-rwxrwxr-x 1 root root  222 Feb  7 08:12 flask
-rwxrwxr-x 1 root root  227 Feb  7 08:12 mako-render
-rwxrwxr-x 1 root root  235 Feb  7 08:12 pip
-rwxrwxr-x 1 root root  235 Feb  7 08:12 pip3
-rwxrwxr-x 1 root root  235 Feb  7 08:12 pip3.9
-rwxrwxr-x 1 root root  236 Feb  7 08:12 pybabel
lrwxrwxrwx 1 root root    7 Feb  7 08:20 python -> python3
lrwxrwxrwx 1 root root   18 Feb  7 08:20 python3 -> /usr/bin/python3.9
lrwxrwxrwx 1 root root    7 Feb  7 08:20 python3.9 -> python3
-rwxrwxr-x 1 root root  235 Feb  7 08:12 qr
-rwxrwxr-x 1 root root  230 Feb  7 08:12 sqlformat
-rwxrwxr-x 1 root root  232 Feb  7 08:12 sshtunnel
-rwxrwxr-x 1 root root  222 Feb  7 08:12 wheel

It seems pretty clear to me that you've somehow installed a build of pgAdmin for an older version of Ubuntu, one which uses Python 3.8. Based on what we currently support, that can only be Ubuntu 20.04 as that's the only Ubuntu or Debian build that uses Python 3.8.

What is in /etc/os-release on your system, and what is the output of the command:

lsb_release -cs


--

Re: installation not working for Ubuntu 21.10 impish

От
Dave Page
Дата:
Hi

On Thu, 3 Mar 2022 at 17:24, Garrett Simpson <elgaricimo@gmail.com> wrote:
Hi Dave,
Appreciate the quick response!
Definitely have Impish...

garrett@garrett-external:/etc$ lsb_release -cd
Description: Ubuntu 21.10
Codename: impish

garrett@garrett-external:/etc$ lsb_release -cs
impish

But for some reason I don't have  the os-release directory:

garrett@garrett-external:/etc$ cd /etc/os-release
bash: cd: /etc/os-release: Not a directory

Right, that message means that there's something on the filesystem with that name, but it's not a directory - which is as expected; os-release is a text file.
 


I think what probably happened is when I was initially stuck, and trying to run pgadmin4 from the terminal, not seeing anything happen, and thinking it was not fully installed when it was, I started monkeying around with the urls in /etc/apt/sources.list.d to try uninstalling and reinstalling past releases, following a bit too blindly things I found searching online...

garrett@garrett-external:/etc/apt/sources.list.d$ ls
deadsnakes-ubuntu-ppa-impish.list  pgadmin4.list.save  pgdg.list.save
pgadmin4.list                      pgdg.list


Looking at pgadmin4.list.save , I see I had at least tried to use hirsute 's repo:

garrett@garrett-external:/etc/apt/sources.list.d$ cat pgadmin4.list.save
    deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/hirsute pgadmin4 main

I'm thinking this is overriding the correct impish repos, so I'll try deleting that file, purging the installation and re-installing:

garrett@garrett-external:/etc/apt/sources.list.d$ ls
    deadsnakes-ubuntu-ppa-impish.list  pgadmin4.list  pgadmin4.list.save  pgdg.list  pgdg.list.save
garrett@garrett-external:/etc/apt/sources.list.d$ sudo rm pgadmin4.list.save

double check that the pgadmin4 sources are correct...
garrett@garrett-external:/etc/apt/sources.list.d$ ls
    deadsnakes-ubuntu-ppa-impish.list  pgadmin4.list  pgdg.list  pgdg.list.save
garrett@garrett-external:/etc/apt/sources.list.d$ cat pgadmin4.list
  deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4 main

^ok definitely the problem...should fix that....

garrett@garrett-external:/etc/apt/sources.list.d$ sudo sed -i 's/focal/impish/g' ./pgadmin4.list
garrett@garrett-external:/etc/apt/sources.list.d$ cat ./pgadmin4.list
  deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/impish pgadmin4 main

uninstall pgadmin4
garrett@garrett-external:/etc/apt/sources.list.d$ sudo apt purge pgadmin4
garrett@garrett-external:/etc/apt/sources.list.d$ sudo apt autoremove

reinstall pgadmin4
garrett@garrett-external:/etc/apt/sources.list.d$ sudo apt update && sudo apt install pgadmin4

And now it works fine

Yes, using the wrong repo would certainly account for the Python version mismatch.

 

So you were right, apologies for the self inflicted goose chase -- but definitely learned a lot in the process!

:-). Glad it's working now!
 
--

Estimated release date for official pgadmin4 repos for Ubuntu 22.04 Jammy Jellyfish?

От
Garrett Simpson
Дата:
Hi lovely support team,

Wondering if there's an eta for the glorious day you can just sudo apt install pgadmin4 on 22.04 and it will just work!

For now, for others that recently upgraded to 22.04, this work around may be useful (just doing the web version in a python virtual environment)


Re: Estimated release date for official pgadmin4 repos for Ubuntu 22.04 Jammy Jellyfish?

От
Akshay Joshi
Дата:
Hi Garrett

We will have a release on 12th May 2022 for Ubuntu 22.04 Jammy Jellyfish. Currently, it is in the testing phase.

On Tue, May 3, 2022 at 12:20 PM Garrett Simpson <elgaricimo@gmail.com> wrote:
Hi lovely support team,

Wondering if there's an eta for the glorious day you can just sudo apt install pgadmin4 on 22.04 and it will just work!

For now, for others that recently upgraded to 22.04, this work around may be useful (just doing the web version in a python virtual environment)




--
Thanks & Regards
Akshay Joshi
pgAdmin Hacker | Principal Software Architect
EDB Postgres
Mobile: +91 976-788-8246