Has anyone got QGIS to install on Ubuntu 16.04 LTS
Asked Answered
T

5

9

Following the directions provided at this page and am getting the following errors.

The following packages have unmet dependencies:

python-qgis : Depends: python-qgis-common (= 1:2.8.8+20trusty) but it is not going to be installed
.......

E: Unable to correct problems, you have held broken packages.

Is this a problem with 16.04 or an error I have caused?

Transcontinental answered 27/4, 2016 at 3:13 Comment(1)
I did not succeed so far. I have a dependency problem with qgis-providers. But I recently upgraded from 15.10 to 16.04 and had qgis previously installedFrancoise
N
10

It's definitely not a problem with 16.04. I had faced a similar problem installing qgis after messing up some dependencies by install gnome3. I tried all those remove, autoremove, clean etc.. Tried removing and adding the ppa but none of it worked. I finally got it installed using aptitude package manager.

Try this first:

sudo apt-get update then sudo apt-get -f install.

If that doesn't work (didn't work for in this case too.) try the higher level package manager aptitude.

sudo aptitude install qgis python-qgis qgis-plugin-grass

It gives multiple solutions like below and you can select one. I would recommend answering no for every question first time that way you get to see all the options. You can read what is going to be installed and removed to get the picture.

Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:

      Downgrade the following packages:                                                                    
1)      libqt4-declarative [4:4.8.7+dfsg-7ubuntu1~xenialoverlay1~1 (now) -> 4:4.8.7+dfsg-5ubuntu2 (xenial)]
2)      libqt4-network [4:4.8.7+dfsg-7ubuntu1~xenialoverlay1~1 (now) -> 4:4.8.7+dfsg-5ubuntu2 (xenial)]    
3)      libqt4-opengl [4:4.8.7+dfsg-7ubuntu1~xenialoverlay1~1 (now) -> 4:4.8.7+dfsg-5ubuntu2 (xenial)]     
4)      libqt4-script [4:4.8.7+dfsg-7ubuntu1~xenialoverlay1~1 (now) -> 4:4.8.7+dfsg-5ubuntu2 (xenial)]     
5)      libqt4-sql [4:4.8.7+dfsg-7ubuntu1~xenialoverlay1~1 (now) -> 4:4.8.7+dfsg-5ubuntu2 (xenial)]        
6)      libqt4-sql-sqlite [4:4.8.7+dfsg-7ubuntu1~xenialoverlay1~1 (now) -> 4:4.8.7+dfsg-5ubuntu2 (xenial)] 
7)      libqt4-svg [4:4.8.7+dfsg-7ubuntu1~xenialoverlay1~1 (now) -> 4:4.8.7+dfsg-5ubuntu2 (xenial)]        
8)      libqt4-xml [4:4.8.7+dfsg-7ubuntu1~xenialoverlay1~1 (now) -> 4:4.8.7+dfsg-5ubuntu2 (xenial)]        
9)      libqt4-xmlpatterns [4:4.8.7+dfsg-7ubuntu1~xenialoverlay1~1 (now) -> 4:4.8.7+dfsg-5ubuntu2 (xenial)]
10)     libqtcore4 [4:4.8.7+dfsg-7ubuntu1~xenialoverlay1~1 (now) -> 4:4.8.7+dfsg-5ubuntu2 (xenial)]        
11)     libqtdbus4 [4:4.8.7+dfsg-7ubuntu1~xenialoverlay1~1 (now) -> 4:4.8.7+dfsg-5ubuntu2 (xenial)]        
12)     libqtgui4 [4:4.8.7+dfsg-7ubuntu1~xenialoverlay1~1 (now) -> 4:4.8.7+dfsg-5ubuntu2 (xenial)]         


Accept this solution? [Y/n/q/?] y
The following packages will be DOWNGRADED:
  libqt4-declarative libqt4-network libqt4-opengl libqt4-script libqt4-sql libqt4-sql-sqlite libqt4-svg libqt4-xml libqt4-xmlpatterns libqtcore4 libqtdbus4 libqtgui4 
The following NEW packages will be installed:
  libdrm-dev{a} libfcgi0ldbl{a} libgl1-mesa-dev{a} libglade2-0{a} libglu1-mesa-dev{a} libjs-jquery-ui{a} libjs-leaflet{a} liblwgeom-dev{a} libqca2{a} libqca2-plugin-ossl{a} libqca2-plugins{a} 
  libqgis-analysis2.18.3{a} libqgis-app2.18.3{a} libqgis-core2.18.3{a} libqgis-customwidgets{a} libqgis-gui2.18.3{a} libqgis-networkanalysis2.18.3{a} libqgis-server2.18.3{a} libqgisgrass7-2.18.3{a} 
  libqgispython2.18.3{a} libqjson0{a} libqt4-dbus{a} libqt4-designer{a} libqt4-dev{a} libqt4-dev-bin{a} libqt4-help{a} libqt4-opengl-dev{a} libqt4-qt3support{a} libqt4-scripttools{a} libqt4-test{a} 
  libqtassistantclient4{a} libqwt5-qt4{a} libspatialindex4v5{a} libx11-xcb-dev{a} libxcb-dri2-0-dev{a} libxcb-dri3-dev{a} libxcb-glx0-dev{a} libxcb-present-dev{a} libxcb-randr0-dev{a} libxcb-render0-dev{a} 
  libxcb-shape0-dev{a} libxcb-sync-dev{a} libxcb-xfixes0-dev{a} libxdamage-dev{a} libxext-dev{a} libxfixes-dev{a} libxshmfence-dev{a} libxxf86vm-dev{a} mesa-common-dev{a} python-cycler{a} python-dateutil{a} 
  python-future{a} python-gdal{a} python-glade2{a} python-httplib2{a} python-jinja2{a} python-markupsafe{a} python-matplotlib{a} python-matplotlib-data{a} python-pygments{a} python-pyparsing{a} 
  python-pyspatialite{a} python-qgis python-qgis-common{a} python-qscintilla2{a} python-qt4{a} python-qt4-sql{a} python-shapely{a} python-sip{a} python-tz{a} python-yaml{a} qdbus{a} qgis qgis-common{a} 
  qgis-plugin-grass qgis-plugin-grass-common{a} qgis-provider-grass{a} qgis-providers{a} qgis-providers-common{a} qt4-designer{a} qt4-linguist-tools{a} qt4-qmake{a} x11proto-damage-dev{a} 
  x11proto-dri2-dev{a} x11proto-fixes-dev{a} x11proto-gl-dev{a} x11proto-xext-dev{a} x11proto-xf86vidmode-dev{a} 
The following packages are RECOMMENDED but will NOT be installed:
  qt-at-spi 
0 packages upgraded, 88 newly installed, 12 downgraded, 0 to remove and 57 not upgraded.
Nijinsky answered 5/2, 2017 at 3:22 Comment(2)
I had OPs problem after upgrading to 16.04. I followed this answer and noted that the second option removed all the offending packages. After doing this. then uninstalling with aptitude and then fixing the sources.list file for xenial (I use deb http://qgis.org/debian xenial main) I could install qgis with sudo aptitude install qgis python-qgis qgis-provider-grassHistoriographer
If you install QGis from the main repositories, and later install other FOSS4G software, say GRASS, you will inevitable fall into trouble. To guarantee all your FOSS4G uses the same libraries, you should install packages exclusively from the Debian/Ubuntu GIS repositories.Campagna
L
8

The most reliable way of installing FOSS4G on Debian or Ubuntu is using the Debian/Ubuntu GIS repository network. Personally I use the ubuntu-gis unstable PPA, where packages are actually quite stable.

You can add this PPA to your sources by editing the sources.list file:

sudo pico /etc/apt/sources.list

And adding the following lines:

deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu xenial main 
deb-src http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu xenial main

Finally update your sources and install QGis:

sudo apt update
sudo apt install qgis
Loewi answered 29/9, 2016 at 12:20 Comment(2)
Here's there references instructions from ubuntugis too - trac.osgeo.org/ubuntugis/wiki/UbuntuGISRepositoryZymogen
Also on ubuntu, it's /etc/apt/sources.listZymogen
J
3

Is as easy as running.Qgis 2.8.6

sudo apt-get update

sudo apt-get install qgis python-qgis

For Qgis 2.18 run a terminal and:

sudo gedit /etc/apt/sources.list 

And add:

deb http://qgis.org/debian xenial main 
deb-src http://qgis.org/debian xenial main

then run:

sudo apt-get update 
sudo apt-get install qgis python-qgis qgis-plugin-grass 

If Saga is not installed:

sudo apt-add-repository ppa:johanvdw/saga-gis
sudo apt-get update
sudo apt-get install saga
Jair answered 28/4, 2016 at 12:12 Comment(1)
If you read the question you would see that this was one of the commandsEndgame
V
1

Despite reading many advice tips on stack overlow & forums I couldn't get QGIS to install on Ubuntu 16.04 until I came across this short and helpful video: https://www.youtube.com/watch?v=hmJwYaYmRDU

Here are the steps you need to follow in the terminal:

Step 1.

Type in: sudo nano /etc/apt/sources.list [press enter]

Step 2.

Type in:

deb https://qgis.org/ubuntugis-ltr xenial main

deb-src https://qgis.org/ubuntugis-ltr xenial main

deb http:/ppa.launchpad.net/ubuntugis-unstable/ubuntu/ubuntu xenial main

[Press Enter, and when prompted to "Save modified buffers", press y key]

Step 3.

Type in: wget -O - https://qgis.org/downloads/qgis-2017.gpg.key | gpg --import [press enter]

Type in: gpg --fingerprint CAEB3DC3BDF7FB45 [press enter]

Step 4.

Type in: sudo apt-get update [press enter]

Step 5.

Type in: sudo apt-get install qgis-server python-qgis [press enter]

Do you want to continue? - [press y key]

Install these packages without verification? [press y key]

QGIS will then install and thereafter you will find it amongst your list of programs. Good luck, hope this helped.

Valora answered 1/5, 2018 at 11:7 Comment(0)
A
0

I had the exact same issue and in addition I could not install aptitude. I found out that I had not ticked the option

Canonical-supported free and open-source software (main)

in Software & updates

I used the Ubuntu ppa http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu

and aptitude to install qgis

Everything works now

Thanks

Autarch answered 23/3, 2018 at 17:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.