I've been trying to install PostGIS and pgRouting on an AWS Ubuntu server (first tried 13.10, then reverted to 12.04, both 64bit "small" instance) for several days now but no matter what I do I keep getting hung up by the dependency libcgal8.

Among many other things, I've tried using exactly the steps @dkastl recommended in this post:

sudo add-apt-repository ppa:ubuntugis/ppa
sudo add-apt-repository ppa:georepublic/pgrouting
sudo apt-get update
sudo apt-get install postgresql-9.1-pgrouting postgresql-9.1-postgis-2.0

After executing the last command the system complained that

Package 'postgresql-9.1-postgis-2.0 is unavailable, but  is referred to by another package

Checking the ubuntugis ppa: I determined that the correct name is postgresql-9.1-postgis. Substituting that package name got me to the roadblock I've encountered all along:

The following packages have unmet dependencies:
postgresql-9.1-pgrouting : Depends : libcgal8 but is not installable
E: Unable to correct problems, you have held broken packages.

I've tried everything to get around this issue including the following:

  • Separating the postgis and pgrouting install commands and switching the order they were executed
  • Tried using $ sudo apt-get install postgresql-9.1-pgrouting --no-install-recommends but this didn't work either (still complained about unmet libcgal8 dependency)
  • Tried downloading libcgal8 and its dependencies and installing them directly, which was a lost cause
  • Using $ sudo apt-get -f install which was suggested by the system at some point, and seemed to do something but it didn't fix the problem
  • So many other things that I either can't remember or were too desperate to mention

Hoping one of you can point to something really silly that this newb is doing or not doing. Thanks in advance for your help.

  • When you tried to re-install your packages, have you tried to uninstall/remove using the -p flag to make sure everything is removed prior to re-installing? – Carl Carlson Dec 6 '13 at 19:05
  • No but I will try that. When you say "uninstall/remove" or you referring to: sudo apt-get purge package and sudo apt-get --purge autoremove – Doug Stephan Dec 6 '13 at 20:43
  • yes, I believe you can also do apt-get remove -p, but I am not entirely sure. – Carl Carlson Dec 6 '13 at 20:47
  • Okay, I tried that but I still get the libcgal8 dependency complaint when I try to install postgresql-9.1-pgrouting, and furthermore the process ends with ldconfig deferred processing now taking place when I install postgresql-9.1-postgis; I think that usually means their were problems with the install. BTW, I've seen this many times before as well. Starting to think there is some problem with AWS Ubuntu images. – Doug Stephan Dec 6 '13 at 21:05
  • I guess this is more of a problem installing libcgal8 than a GIS issue so I'll take it to another forum. --- For clarification, I also posed the original question, and just to close the loop here, the problem was that by default AWS Ubuntu images don't provide access to multiverse repositories so I had to edit the sources.list file and uncomment all the lines referencing multiverse. Then I was able to successfully execute apt-get install libcgal8 and apt-get install postgresql-9.1-pgrouting – dugn8r Dec 8 '13 at 17:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.