我已经安装了postgres,好吧。
但我尝试安装 pgadmin4 大约 2 小时,但就是做不到。我在互联网上尝试了很多指南,但他们都得到相同的结果:
Package 'pgadmin4' has no installation candidate
我正在使用这个仓库:
deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main
output:
Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease' doesn't support architecture 'i386'
所以,我必须把[arch=amd64]
, 正确的?
它应该看起来像这样?deb [arch=amd64] http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main
好的,i386 错误不会在 apt update 中出现。但后来我尝试apt install pgadmin4
and
sudo apt install pgadmin4
Reading package lists... Done
Building dependency tree
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***
看起来就像一个笑话,我该如何解决这种情况呢?
(更新至2023 ubuntu-22.04LTS)
为了说得更清楚。从这个页面:
https://www.pgadmin.org/download/pgadmin-4-apt/ https://www.pgadmin.org/download/pgadmin-4-apt/
有关于如何设置 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:
# SEE MODIFICATION BELOW
sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/jammy 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
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)