gpt4 book ai didi

postgresql - PostGIS -Ubuntu 安装错误询问依赖关系

转载 作者:行者123 更新时间:2023-11-29 11:23:16 24 4
gpt4 key购买 nike

我是 postgre 和 Ubuntu 的新手。我正在运行带有 Ubuntu 14.04 LTS Trusty 的虚拟机。我正在尝试安装 PostgreSql9.4 数据库和 PostGIS 2.1。这是我在 Ubuntu 机器上运行的命令:

sudo apt-get install wget ca-certificates 
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt trusty-pgdg main" >> /etc/apt/sources.list'
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install postgresql-9.4-postgis-2.1 pgadmin3 postgresql-contrib

但是我收到以下错误。

The following packages have unmet dependencies: pgadmin3 : Depends: libwxbase3.0-0 (>= 3.0.0) but it is not installable            Depends: libwxgtk3.0-0 (>= 3.0.0) but it is not installable            Recommends: pgagent but it is not going to be installed postgresql-9.4-postgis-2.1 : Depends: libgdal1h (>= 1.9.0) but it is not installable                              Depends: libgeos-c1 (>= 3.4.2) but it is not installable                              Depends: liblwgeom-2.1.5 (>= 2.1.2) but it is not going to be installed                              Depends: libproj0 (>= 4.8.0-1) but it is not installableE: Unable to correct problems, you have held broken packages.

我搜索了几个地方并看到了很多响应,但没有一个对我有用。我也试过 PostgreSQL9.3 也没有成功。在此先感谢您的帮助。谢谢

最佳答案

您可能在 postgresql 的存储库中有比您的官方发行版中更高版本的候选包(因此存在未满足的依赖项)。一种可能的解决方案是通过检查它们是否可用作候选(apt-cache 策略)并选择要安装的特定版本(也用于依赖项),从您的发行版 channel 安装相同的包。

在我的系统上它看起来如下:

The following packages have unmet dependencies:
pgadmin3 : Depends: libwxbase3.0-0 (>= 3.0.2) but it is not installable
Depends: libwxgtk3.0-0 (>= 3.0.2) but it is not installable
Recommends: pgagent but it is not going to be installed

apt-cache policy pgadmin3
pgadmin3:
Installed: (none)
Candidate: 1.20.0-1.pgdg70+1
Version table:
1.20.0-1.pgdg70+1 0
500 http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg/main amd64 Packages
1.14.2-2 0
500 http://ftp5.gwdg.de/pub/linux/debian/debian/ wheezy/main amd64 Packages

然后您要安装较低版本:

$ sudo apt-get install pgadmin3=1.14.2-2 pgadmin3-data=1.14.2-2

关于postgresql - PostGIS -Ubuntu 安装错误询问依赖关系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29246946/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com