Package 'pgadmin4' has no installation candidate, for Ubuntu 20.04 [closed]

ε祈祈猫儿з 提交于 2020-07-05 03:14:12

问题


After Upgrading to Ubuntu-20.04 I am unable to install pgadmin4. Also, any other version of pgadmin is not working.

It is showing below error:

Package pgadmin4 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'pgadmin4' has no installation candidate
E: Unable to locate package pgadmin4-apache2

In my "pgdg.list" file which can be accessed from below command

sudo nano /etc/apt/sources.list.d/pgdg.list

I have:

deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main

回答1:


You must create the /etc/apt/sources.list.d/pgdg.list file and add the line:

deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main

Then run:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

Finally, run:

sudo apt-get update && sudo apt-get install pgadmin4

For more details: https://www.postgresql.org/download/linux/ubuntu/




回答2:


I'm having the same issue... apt.postgresql.org is in the "sources.d", I can see it is "Hit" by "apt update", but still no pgadmin4 installation candidate found.

It looks like focal (20.04) is simply not currently supported (although multiple articles indicate it was at one point). Earlier versions are all there. Alas, trying to install them leads to the requirement of python3-psyco2 < 2.8, but 2.8 is the focal version. Perhaps a build fail caused it to drop from repos, or an upstream version change is causing a problem... it's beyond me at this point...

Anyway, I'm not up to working that hard for it... so it's our good old friend "psql" for me right now :-)




回答3:


Check out the discussion on ask ubuntu, they explain the issue and how you can work around it. It's because PGAdmin4 lacks support for Python 3.8, as you can see on Pypi.

You'll either need to wait until a compatible release for Ubuntu 20.04 and Python 3.8 is published or work around it by installing PGAdmin in a Python 3.7 environment via something like virtualenv, conda or Docker.




回答4:


Now it is supported and is available in the focal repo.




回答5:


As of 21/05/2020 there is no pgAdmin-4 package in Ubuntu 20.04.

Another way to run pgAdmin-4 is by using Docker

docker pull dpage/pgadmin4
docker run -p 5050:80 -e "PGADMIN_DEFAULT_EMAIL=XXXX@Xmail.com" -e "PGADMIN_DEFAULT_PASSWORD=thirumal" -d dpage/pgadmin4

Then access the pgadmin4 using URL http://localhost:5050 with user name and password.

Docker image URL: https://hub.docker.com/r/dpage/pgadmin4/

Documentation URL: https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html

Full set up guide https://github.com/M-Thirumal/installation_guide/blob/master/pgadmin4/install_pgadmin4_using_docker.md




回答6:


While I know it's frustrating when things stop working, I believe version 3 has been back ported. I was able to install it as a test on my 20.04 workstation without any trouble.




回答7:


You can also use docker-compose by creating a docker-compose.yaml as follows

version: '3'

services:
  pgadmin:
    container_name: pgadmin
    image: dpage/pgadmin4:latest
    restart: always
    ports:
      - 8082:80
    environment:
      - PGADMIN_DEFAULT_EMAIL=dev@pgadmin.org
      - PGADMIN_DEFAULT_PASSWORD=password

and running docker-compose up.

Make sure you have docker-compose installed if you are going to use this method.



来源:https://stackoverflow.com/questions/61566325/package-pgadmin4-has-no-installation-candidate-for-ubuntu-20-04

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!