包'pgadmin4'没有安装候选包,适用于Ubuntu 20.04 [关闭] 。

问题描述 投票:1回答:1

升级到Ubuntu-20.04后,我无法安装pgadmin4,而且其他版本的pgadmin也无法使用。

它显示以下错误。

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

在我的 "pgdg.list "文件中,可以通过下面的命令来访问。

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

我有。

deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main
postgresql pgadmin-4 ubuntu-20.04
1个回答
7
投票

你必须创建 /etc/apt/sources.list.d/pgdg.list 文件并添加该行。

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

然后运行

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

最后,运行。

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

更多细节。https:/www.postgresql.orgdownloadlinuxubuntu


4
投票

我也有同样的问题......apt.postgresql.org在 "sources.d "中,我可以看到它被 "apt update""Hit "了,但还是没有找到pgadmin4安装候选。

看来focal(20.04)目前根本不支持(虽然多篇文章都表明它 在一个点上)。) 早期的版本都有。唉,试图安装它们会导致要求使用 python3-psyco2 < 2.8,但 2.8 是重点版本。也许是构建失败导致它从repos中掉了下来,或者是上游的版本变化导致了问题......这一点我就不知道了......。

总之,我不愿意为它努力工作......所以现在是我们的老朋友 "psql "为我服务:-)


2
投票

查看讨论 关于ask ubuntu他们解释了这个问题以及如何解决这个问题。这是因为PGAdmin4缺乏对Python 3.8的支持,你可以看到 关于皮皮岛.

你需要等到Ubuntu 20.04和Python 3.8的兼容版本发布,或者通过virtualenv、conda或Docker等在Python 3.7环境中安装PGAdmin来解决这个问题。


1
投票

现在它已经被支持,并且在focal repo中可用。


1
投票

截至21052020,Ubuntu 20.04中没有pgAdmin-4包。

另一种运行pgAdmin-4的方法是使用Docker。

docker pull dpage/pgadmin4
docker run -p 5050:80 -e "[email protected]" -e "PGADMIN_DEFAULT_PASSWORD=thirumal" -d dpage/pgadmin4

然后使用URL访问pgadmin4 http:/localhost:5050 与用户名和密码。

Docker镜像URL。https:/hub.docker.comrdpagepgadmin4。

文件网址。https:/www.pgadmin.orgdocspgadmin4latestcontainer_deployment.html

完整的设置指南 https:/github.comM-Thirumalinstallation_guideblobmasterpgadmin4install_pgadmin4_using_docker.md。


0
投票

虽然我知道当事情停止工作时很令人沮丧,但我相信第3版已经被回溯移植了。我能够在我的20.04工作站上安装它作为测试,没有任何问题。


0
投票

你也可以通过创建一个docker-compose.yaml来使用docker-compose,如下所示

version: '3'

services:
  pgadmin:
    container_name: pgadmin
    image: dpage/pgadmin4:latest
    restart: always
    ports:
      - 8082:80
    environment:
      - [email protected]
      - PGADMIN_DEFAULT_PASSWORD=password

和运行 docker-compose up.

如果你要使用这个方法,请确保你已经安装了docker-compose。

© www.soinside.com 2019 - 2024. All rights reserved.