Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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/rtpostgis-2.0.so', 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:
 /var/cache/apt/archives/postgresql-9.1-postgis_2.0.1-2~precise3_amd64.deb
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
1  
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
1  
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
add comment

3 Answers

Sharpie is alright, but recently UbuntuGis team came in with some stable packages: https://launchpad.net/~ubuntugis/+archive/ppa?field.series_filter=precise, try them.

apt-add-repository deb http://ppa.launchpad.net/ubuntugis/ppa/ubuntu precise main 
apt-add-repository deb-src http://ppa.launchpad.net/ubuntugis/ppa/ubuntu precise main
apt-get install postgis

Also, http://postgis.net/source has a good build manual, till today I used it more often than package installation.

share|improve this answer
1  
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 keyserver.ubuntu.com --recv-keys 314DF160 OR use the ppa method –  wildintellect Jul 29 '13 at 23:52
add comment

I've been refining installation instructions for PostGIS on Ubuntu which pulls from the Postgresql Apt-repository rather than compiling from source.

This will install PostgreSQL 9.3, PostGIS 2.1, PGAdmin3 1.18, and QGIS 2.0

The document is posted in this folder:

https://drive.google.com/folderview?id=0Bxh7puyDgHHoY3BkNEh6OGxfWUk&usp=sharing

Any feedback is appreciated.

share|improve this answer
add comment
up vote -1 down vote accepted

I followed this post and it works like a charm.

share|improve this answer
    
It would be helpful to include highlights and key points from the post, instead of just a link. That way the answer will still be here if the link disappears into 404-land. –  user3461 Nov 5 '13 at 19:05
    
I agree and would, except for me as a newbie and not comfortable with writing code or the Linux command line the whole post was needed on my end. I could just copy and past the whole link. –  LandArch Nov 6 '13 at 14:13
add comment

Your Answer

 
discard

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.