我尝试后sudo apt-get install pgadmin3
收到此消息:
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
pgadmin3 : Depends: libwxbase2.8-0 (>= 2.8.12.1) but it is not installable
Depends: libwxgtk2.8-0 (>= 2.8.12.1) but it is not installable
Recommends: pgagent but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我该如何修复这个问题?
答案1
我遇到了同样的问题,经过长时间的思考后,我意识到我的源中有一个过时的 pgdg.list。删除并重新添加后,一切都很好。
sudo rm /etc/apt/sources.list.d/pgdg.*
echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update -y
sudo apt-get install pgadmin3
答案2
尝试将以下存储库添加到系统:
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | sudo apt-key add -
我遇到了同样的问题并且它对我有帮助。
答案3
我遇到过同样的问题,下面是我修复它的方法:
1) 当我尝试运行sudo apt-get install libwxbase2.8-0 libwxgtk2.8-0
apt-get 时,它告诉我有未使用的依赖项 - pgadmin3-data 和 pgagent,所以我最好删除它们
2) sudo apt autoremove
- 删除它们
3) sudo apt-get install pgadmin3
- 告诉我它需要下载一些所需的依赖项(我刚刚删除的那些)。我说是的,安装就这样顺利进行了。
现在我可以使用 pgadmin3 了。