加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

postgresql – PostGIS -Ubuntu安装错误要求依赖

发布时间:2020-12-13 16:31:21 所属栏目:百科 来源:网络整理
导读:我是postgre和Ubuntu的新手.我正在使用Ubuntu 14.04 LTS Trusty运行VM.我正在尝试安装PostgreSql9.4数据库和PostGIS 2.1.这是我在Ubuntu机器上运行的命令: sudo apt-get install wget ca-certificates sudo sh -c 'echo "deb http://apt.postgresql.org/pub
我是postgre和Ubuntu的新手.我正在使用Ubuntu 14.04 LTS Trusty运行VM.我正在尝试安装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 installable
E: Unable to correct problems,you have held broken packages.

我搜索了几个地方,看到了很多回复,但没有一个对我有用.我也试过PostgreSQL9.3并且也没能成功.谢谢你的帮助.谢谢

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

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

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读