Pgadmin:软件包“pgadmin4”没有安装候选者(Ubuntu 24.04)

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

“我在 Ubuntu 24.04 上安装 pgAdmin4 时遇到问题。当尝试安装软件包“pgadmin4”时,我收到一条错误,指出没有可用的安装候选。我尝试在线搜索解决方案,但还没有找到没有找到明确的解决方案。任何有关如何在 Ubuntu 24.04 上成功安装 pgAdmin4 的指导或建议将不胜感激。

我尝试以下命令:

#
# Setup the repository
#

# Install the public key for the repository (if not done previously):
curl -fsS https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo gpg --dearmor -o /usr/share/keyrings/packages-pgadmin-org.gpg

# Create the repository configuration file:
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/packages-pgadmin-org.gpg] 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

当我运行命令时

sudo apt install pgadmin4
。它给出以下错误消息。

sudo apt install pgadmin4  

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
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

如何解决这个问题?

pgadmin-4
1个回答
0
投票

正如 pgadmin4 github 项目(here)中所述,Ubuntu 24.04 应该在 6 月得到支持。

他们建议了一个临时解决方法:

  1. 使用
    mantic
    代替
    noble
  2. 确保已安装
    python3.11
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/packages-pgadmin-org.gpg] https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/mantic pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'
sudo apt install pgadmin4

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.11

然后 pgAdmin4 应该可以正常启动了。

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