首页 > 解决方案 > 软件包 'pgadmin4' 没有安装候选,适用于 Ubuntu 20.04

问题描述

升级到 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

标签: postgresqlpgadmin-4ubuntu-20.04

解决方案


您必须创建/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.org/download/linux/ubuntu/


推荐阅读