25

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."
3

10 Answers 10

40

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
5
  • I removed the repositories from sources.list and from the software sources. Then ran the ubuntigis in terminal and I still get the same error. Any thoughts? FYI I am newist to Ubuntu and Linux.
    – LandArch
    Commented Jul 9, 2012 at 1:36
  • Clear you local repository by running : $ sudo apt-get clean $ sudo apt-get autoclean after you have added ubuntugis-unstable ppa run $ sudo apt-get -f install apt will try to correct any broken dependencies
    – nickves
    Commented Jul 9, 2012 at 9:11
  • 1
    I did all of the above and I still get the still get unmet dependencies. Any other thoughts?
    – LandArch
    Commented Jul 10, 2012 at 1:05
  • 2
    I got things to work. I actually ahd to forcefully purge the unmet dependencies via dpkg --force-depends --purge "dependency name"
    – LandArch
    Commented Jul 10, 2012 at 21:58
  • @LandArch your comment saved my hours. Thank you. Please write your suggestion as an answer. I will up it.
    – Hamdi
    Commented Dec 4, 2015 at 22:46
6

I have no problems with installing and running of QGis with ubuntu 12.04 (both 32 and 64 Bit)

I took the following procedure:

  1. I installed "synaptic" with ubuntu-Software-center, as I found out uninstalling software is not always clean with ubuntu-software-center.
  2. In synaptic I added the appropriate package-source, mentioned on the qgis-website in the ubuntu-release section, which is: "deb http://qgis.org/debian precise main"
  3. I then close synaptic and open a terminal-window and type:

    sudo gpg --keyserver keyserver.ubuntu.com --recv 997D3880

    and hit return. Next I type:

    sudo gpg --export --armor 997D3880 | sudo apt-key add -

    I coppied both commands from the qgis-website, they install a key for the package source.

  4. I restart synaptic and update the package sources.
  5. I then search for qgis in synaptic, choose the package qgis and install it. A couple of dependencies will also be installed.

That's it.

If you tried to install qgis before with different package-sources you should deactivate them and remove all qgis-packages installed prior installation.

I always install qgis on a clean freshly installed machine - probably you should reinstall ubuntu freshly if there is too much fuzz on the machine. I always do this after I tried to install software without success as it is not always possible to remove all dependencies.

Hope that helps

1
  • Works fine also with software center, just use Edit -> Software sources... from the menu to input the package source
    – a1an
    Commented Jul 25, 2013 at 15:50
5

You have the nightly builds (that's were 1.9.90+git20120502+6229eec~precise1 comes from - but strangly rather old) and a stable repository (either the qgis.org repository or ubuntugis) in your /etc/apt/sources.list. You should use just one.

1
  • This worked for me (Ubuntu 13.04). Removed the PPA and used just the nightly repository in my sources.list.
    – dimitris
    Commented Jul 24, 2013 at 9:41
3

I installed the stable version with:

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

QGIS 1.8 and master (aka development version) installs without any major problem under Ubuntu 12.04. From the error messages it seems you have mixed up repositories. So I would suggest to clean your repositories list, remove any qgis related package and install it again using the instructions you can find in the UBUNTUGIS repository, this way you'll get also the latest versions of GDAL, GRASS, etc.

https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable/

2

I got it working by going into synaptic, searching for and completely removing all grass and gdal packages, then doing:

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install qgis

It installed 1.8.0- Lisboa

2

For those who have problems using the plugins in Ubuntu 12.04LTS mostly its because of permissions, so try this:

sudo chown username:username /home/username/.qgis

Attention where are the folder .qgis

Then try again to install the plugins, in my case worked perfectly.

Regards José Santos

1

This is how I was able to install QGIS onto ubuntu 12.04

http://qgismalaysia.blogspot.com/2012/04/ubuntu-1204-qgis-1990-installation.html

I followed the blog but I used the ubuntugis rather than plain ubuntu

0

To avoid the error messages, I also removed QGIS from the "other" repositories. My original installation was from before it was available in the software center. After that, I updated my packages and it cleared up my problems.

0

I got things to work. I actually had to forcefully purge the unmet dependencies via dpkg --force-depends --purge "dependency name"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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