[GIS] Installing QGIS on Ubuntu

installationqgisUbuntu

Has anyone had any luck with getting QGIS working on Ubuntu 12.04? I have tried the stable and unstable versions and with not luck. I also get the following:

"Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
qgis : Depends: qgis-providers (= 1.8.0-1~precise1) but 1.9.90+git20120502+6229eec~precise1 is to be installed
    Depends: qgis-common (= 1.8.0-1~precise1) but 1.9.90+git20120502+6229eec~precise1 is to be installed
    Recommends: qgis-plugin-globe but it is not going to be installed
    Recommends: qgis-plugin-grass but it is not going to be installed
E: Unable to correct problems, you have held broken packages."

Best Answer

You can use ubuntugis ppa, which contains everything you need:

 $ sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
 $ sudo apt-get update
 $ sudo apt-get install qgis

The system will take care after the necessary dependencies

Your problem also suggests that you have broken dependencies for qgis. One way to fix this is to clean your cache by running in terminal (you can open the terminal in gnome with alt + ctrl + T)

$ sudo apt-get clean

or

$ sudo apt-get autoclean

and then ask apt to try and correct any broken dependencies:

$ sudo apt-get -f install 

if the output is similar to :

$ 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

it means that you need some additional packages that you weren't informed about. To install them run:

$ sudo apt-get dist-upgrade
Related Question