我是在SO上问这个问题的,但是现在我想问题主要出在软件包管理上,并且属于这里。
在原始帖子中可以找到所有详细信息之后,我尝试了一下(将sudo消除为多余的):
$ apt list | grep gdal | grep installed
gdal-bin/trusty,now 1.11.0+dfsg-1~exp2~trusty1 amd64 [installed]
libgdal1h/trusty,now 1.11.0+dfsg-1~exp2~trusty1 amd64 [installed,automatic]
$ apt-get purge gdal-bin
$ apt-get purge libdal1h
$ add-apt-repository ppa:ubuntugis/ppa
$ apt-get update
W: Failed to fetch http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/dists/trusty/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/ubuntugis/ppa/ubuntu/dists/trusty/main/binary-i386/Packages 404 Not Found
很明显,某些东西配置错误...我不知道要检查什么...
然后
$ fab vagrant.Provision # see the original question above for what this is doing at the linux level
这仍然会遇到完全相同的libdal1
v。libgdal1h
依赖问题:
[localhost] sudo: DEBIAN_FRONTEND=noninteractive apt-get install --quiet --assume-yes postgresql-9.3-postgis-2.1
[localhost] out: {...}
[localhost] out: Some packages could not be installed. This may mean that you have
[localhost] out: requested an impossible situation or if you are using the unstable
[localhost] out: distribution that some required packages have not yet been created
[localhost] out: or been moved out of Incoming.
[localhost] out: The following information may help to resolve the situation:
[localhost] out:
[localhost] out: The following packages have unmet dependencies:
[localhost] out: postgresql-9.3-postgis-2.1 : Depends: libgdal1 (>= 1.9.0) but it is not going to be installed
[localhost] out: Recommends: postgis but it is not going to be installed
[localhost] out: E: Unable to correct problems, you have held broken packages.
更多信息 :
vagrant@ubuntu-14:~$ apt-cache policy postgresql-9.3-postgis-2.1
postgresql-9.3-postgis-2.1:
Installed: (none)
Candidate: 2.1.3+dfsg-3.pgdg12.4+2
Version table:
2.1.3+dfsg-3.pgdg12.4+2 0
500 http://apt.postgresql.org/pub/repos/apt/ precise-pgdg/main amd64 Packages
2.1.2+dfsg-2 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
@ saircot895使我发现的问题是存储库之间存在冲突。在我提出的问题中看不到这些细节,因为我没有足够深入地研究正在设置虚拟Ubuntu盒子的Fabric脚本。在这种情况下,脚本使用的是Postgres本身的较旧版本的“ Precise”,但postgis则在使用较新的“ Trusty”。将postgres安装(以及其余的配置)更改为较新的版本可以解决此问题。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句