Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

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 am trying to install PostGIS on Ubuntu 12.04 and I think everything is installed correctly except for postgresql. I followed this post. I get the following error and nothing I do seems to satisfy the unmet dependency.

dpkg: error processing /var/cache/apt/archives/postgresql-9.1-postgis_2.0.1-2~precise3_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/postgresql/9.1/lib/', which is also in package postgresql-9.1-postgis2 2.0.0-1ubuntu1~ppa18~precise1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

A little help for this ubuntu/gis novice.

share|improve this question
Do you really need Postgres 9.2? – R.K. Jan 18 '13 at 2:23
Is your PostgreSQL 9.2 64bits version? Because if PostGIS is 32bits version, maybe they don't "match". Few years ago I faced a weird and similar problem and finally it was that my PostgreSQL was 64 and PostGIS (in that moment it was 1.3.3 or 1.3.5 version) could not work over this version. I just switched Postgre to 32 bits. – iamgin Jan 18 '13 at 10:10
First, thank you for the edit, I couldn't figure out why the error code split like that and I got frustrated trying to correct it. I am not sure what I need. I have been reading posts about PostGIS and thought I would install so that I can start learning and play with it. Any correction for installation would be greatly appreciated. – LandArch Jan 18 '13 at 16:40

Sharpie is alright, but recently UbuntuGis team came in with some stable packages:, try them.

apt-add-repository deb precise main 
apt-add-repository deb-src precise main
apt-get install postgis

Also, has a good build manual, till today I used it more often than package installation.

share|improve this answer
This method also requires adding the repo key or you'll get a warning and possible a fail that the repo can't be authenticated. sudo apt-key adv --keyserver --recv-keys 314DF160 OR use the ppa method – wildintellect Jul 29 '13 at 23:52

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.