Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I asked this over on SO, but now I'm thinking the problem is mainly package management and belongs here.

Subsequent to all the detail that can be found in the original post, I have tried (sudo eliminated as redundant):

$ 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  404  Not Found

W: Failed to fetch  404  Not Found

so clearly something is misconfigured... I don't know what to check for on my side...


$ fab vagrant.Provision # see the original question above for what this is doing at the linux level

This still runs into the exact same libdal1 v. libgdal1h dependency issue:

[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.

more info :

vagrant@ubuntu-14:~$ apt-cache policy 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 precise-pgdg/main amd64 Packages
     2.1.2+dfsg-2 0
        500 trusty/universe amd64 Packages
share|improve this question
Have you tried using the stable versions instead of the unstable versions? – Charles Green Jun 30 '14 at 17:47
I have. See the edited question. Short answer: did, doesn't help. – Ben Jun 30 '14 at 18:23
Can you run apt-cache policy postgresql-9.3-postgis-2.1? The version in the main repos depends on libgdal1h, which makes me think another PPA is providing the package. – saiarcot895 Jun 30 '14 at 18:31
good tip: edited the question – Ben Jun 30 '14 at 18:36
Well, there's your problem. Note the repo for the 2.1.3+dfsg-3.pgdg12.4+2 version; it's from PostgreSQL, but it's for Precise. That tends to mess stuff up. Go into /etc/apt/sources.list, and remove the line referencing that repo. Update and try to install again. – saiarcot895 Jun 30 '14 at 18:59
up vote 1 down vote accepted

The problem, as @saircot895 lead me to discover, was a conflict between the repos. The specifics were not visible in the questions I asked, because I had not delved deeply enough into the Fabric script which was setting up the virtual Ubuntu box in question. In the event, the script was using the older "Precise" release for postgres itself, but postgis was looking on the newer "Trusty". Changing the postgres install (and the rest of the provisioning) to the newer release resolved the issue.

share|improve this answer

I've sucessfully (without any broken dependencies) installed postgresql-9.1-postgis-2.0 instead of postgresql-9.1-postgis. And database is working ok.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.