5

I've tried several packages including ubuntugis but none helped. How to install qgis 3.x, more preferably qgis 3.4 lts in Ubuntu?

I've added following repos:: sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable sudo apt-get update

and then tried to install: but i get these errors::

$ sudo apt-get install qgis python-qgis qgis-plugin-grass
[sudo] password for hillson: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 python-qgis : Depends: python-qgis-common (= 2.18.28+dfsg-1~bionic1) but it is not going to be installed
               Depends: python-dateutil but it is not installable
               Depends: python-future but it is not installable
               Depends: python-httplib2 but it is not installable
               Depends: python-jinja2 but it is not installable
               Depends: python-markupsafe but it is not installable
               Depends: python-owslib but it is not installable
               Depends: python-psycopg2 but it is not installable
               Depends: python-pygments but it is not installable
               Depends: python-qscintilla2 but it is not installable
               Depends: python-qt4 but it is not installable
               Depends: python-qt4-sql but it is not installable
               Depends: python-requests but it is not installable
               Depends: python-sip but it is not installable
               Depends: python-tz but it is not installable
               Depends: python-yaml but it is not installable
               Depends: libqgispython2.18.28 but it is not going to be installed
               Depends: libqgis-analysis2.18.28 (>= 2.14.0) but it is not going to be installed
               Depends: libqgis-core2.18.28 (>= 2.18.28) but it is not going to be installed
               Depends: libqgis-gui2.18.28 (>= 2.18.17) but it is not going to be installed
               Depends: libqgis-networkanalysis2.18.28 (>= 2.14.0) but it is not going to be installed
               Depends: libqgis-server2.18.28 (>= 2.18.21) but it is not going to be installed
               Depends: libqscintilla2-qt4-13 (>= 2.8.4) but it is not installable
               Depends: libqt4-network (>= 4:4.5.3) but it is not installable
               Depends: libqt4-xml (>= 4:4.5.3) but it is not installable
               Depends: libqtcore4 (>= 4:4.8.0) but it is not installable
               Depends: libqtgui4 (>= 4:4.8.0) but it is not installable
               Depends: sip-api-12.3 but it is not installable
 qgis : Depends: libgsl23 but it is not installable
        Depends: libgslcblas0 but it is not installable
        Depends: libqgis-analysis2.18.28 (>= 2.14.0) but it is not going to be installed
        Depends: libqgis-app2.18.28 (>= 2.14.0) but it is not going to be installed
        Depends: libqgis-core2.18.28 (>= 2.18.28) but it is not going to be installed
        Depends: libqgis-gui2.18.28 (>= 2.18.17) but it is not going to be installed
        Depends: libqgis-networkanalysis2.18.28 (>= 2.0.1) but it is not going to be installed
        Depends: libqt4-network (>= 4:4.5.3) but it is not installable
        Depends: libqt4-sql (>= 4:4.5.3) but it is not installable
        Depends: libqt4-xml (>= 4:4.5.3) but it is not installable
        Depends: libqtcore4 (>= 4:4.8.0) but it is not installable
        Depends: libqtgui4 (>= 4:4.8.0) but it is not installable
        Depends: qgis-providers (= 2.18.28+dfsg-1~bionic1) but it is not going to be installed
        Depends: qgis-common (= 2.18.28+dfsg-1~bionic1) but it is not going to be installed
        Recommends: qgis-provider-grass but it is not going to be installed
 qgis-plugin-grass : Depends: qgis-provider-grass (= 2.18.28+dfsg-1~bionic1) but it is not going to be installed
                     Depends: grass-core (>= 7.6.0) but it is not going to be installed
                     Depends: grass760
                     Depends: libqgis-app2.18.28 (>= 2.14.0) but it is not going to be installed
                     Depends: libqgis-core2.18.28 (>= 2.18.17) but it is not going to be installed
                     Depends: libqgis-gui2.18.28 (>= 2.18.17) but it is not going to be installed
                     Depends: libqgisgrass7-2.18.28 (>= 2.14.0) but it is not going to be installed
                     Depends: libqt4-svg (>= 4:4.5.3) but it is not installable
                     Depends: libqt4-xml (>= 4:4.5.3) but it is not installable
                     Depends: libqtcore4 (>= 4:4.8.0) but it is not installable
                     Depends: libqtgui4 (>= 4:4.8.0) but it is not installable
E: Unable to correct problems, you have held broken packages.
  • I doubt that anyone can help without you providing details. Assuming that this SHOULD work (and I see 3.4 listed on this page for ubuntugis) then this sounds more like a question on how you specifically sort out a specific problem you specifically are having. Without knowing what that problem is nobody can help. I'm making some assumptions here - I can think of some things you might have done wrong - but it's a long list and it wouldn't make sense to give an answer listing every possibility. – Rostranimin Jan 25 '19 at 14:05
  • 2
    Avoid ubuntugis, and take the ubuntu (not ubuntugis) version from the qgis repo. – AndreJ Jan 26 '19 at 6:40
  • But @AndreJ ubuntu repo holds older versions only. If i am right! Isnt it? – ghimirehillson Jan 27 '19 at 5:49
  • 1
    packages.ubuntu.com/bionic/qgis and launchpad.net/~ubuntugis/+archive/ubuntu/… have older versions, but qgis.org/ubuntu has the current QGIS 3.4. – AndreJ Jan 27 '19 at 9:33
3

The ubuntugis ppa holds only LTR versions, currently QGIS 2.18.28, see https://launchpad.net/~ubuntugis/+archive/ubuntu/ubuntugis-unstable/?field.series_filter=bionic.

If you want QGIS 3.4, you can take the https://qgis.org/ubuntu/ repository without any ubuntugis dependencies. You might have to remove any packages you have from ubuntugis before installing.

https://qgis.org/ubuntugis/ has support for bionic as well, but faced some issues recently. The QGIS packages are built against GRASS 7.4.3, but the ubuntugis ppa has meanwhile switched to GRASS 7.6.0. So I don't suggest that at the moment.

The situation is different for Xenial, because the main ubuntu repo for that does not include GDAL 2, which is mandatory for QGIS 3.


UPDATE

Ubuntugis unstable now has QGIS 3.4.14 for bionic.

|improve this answer|||||
  • So you're saying that the versions-installed/dependencies-required depend on the repo used? Would https://qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu be the most up to date location for which repo one might want? How might one determine the mismatch between versions like the one you knew about? (GDAL 2) – Mr Purple Jun 9 '19 at 1:55
  • Yes, the site you linked is the best place to look for valid repo/version combinations. And the footnote qgis.org/en/site/forusers/alldownloads.html#id11 tells you about the GDAL2 limitation. – AndreJ Jun 9 '19 at 6:13
  • Same problem 6 months later and same solution worked again. Cheers, Andre. +1. Should have upped the first time! – Mr Purple Jan 3 at 21:17
0

i had a similar problem on manjaro. i needed to install any dependencies manually. on ubuntu you could install the dependencies via synaptic, i assume. a workaround for your problem could be the official flatpak package for qgis - only if installing qgis via repository or ppa keeps failing. there should be installing guides on the qgis homepage and/or flathub.

|improve this answer|||||
0

I had the same problem. What worked for me was mainly following this article, specifically:

1.Open /etc/apt/sources.list with

sudo nano /etc/apt/sources.list

2.If there is any mention of QGIS, delete that line. Then, copy there this line:

deb https://qgis.org/ubuntugis bionic main

3.Then, run this

sudo apt update && sudo apt-get install qgis python3-qgis qgis-plugin-grass

4.If it didn't work, go back to step 1 but instead of deb https://qgis.org/ubuntugis bionic main, try one of the following:

deb https://qgis.org/debian bionic main
deb https://qgis.org/ubuntu bionic main
|improve this answer|||||
-1

Use the following gist to install QGIS 3.4 on your desktop! (for ubuntu 18)

https://gist.github.com/prakharcode/4a3c32138aacda8284bffb5645f04674

|improve this answer|||||
  • does not work for me. Problem of key ad other people have the 2.18 installed – jlSta Aug 23 '19 at 13:52

Your Answer

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

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