我是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
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。