58

I am relatively new to Linux, so can you indicate the exact commands (step-by-step) that I need to type to get the latest QGIS installed on Ubuntu 14.04.

I have tried to follow the instructions provided here https://www.qgis.org/en/site/forusers/alldownloads.html but I haven't managed to install anything.

Can someone explain to me step by step process of doing it. Right from adding the QGIS repository on the sources list.

I have Ubuntu 14.04.1 LTS installed on a 32-bit Dell Latitude E4310 Machine

closed as too broad by PolyGeo Dec 5 '17 at 23:41

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • These days, using qgis.org may generate a 403 Forbidden error. You should replace http://qgis.org with http://ubuntu.qgis.org in all answers below, including in sources.list and to get the gpg key. Reference: gis.stackexchange.com/q/185158/5901 and qgis-developer.osgeo.narkive.com/MYBqCUx8/… – Cao Minh Tu Jun 29 '16 at 1:26
  • @MARIO did you find a solution with any of these solutions? – DPSSpatial Dec 9 '16 at 22:41
  • Check for version first: It might be that your repositories might not be the same as you need.. i.e. debian/ubunto.. ubtunto14-trusty/16-xenial. Also check for ppa... previous version might be present – real75 Jan 8 '17 at 1:15
  • 1
    Hmm, when a question with 57000 ! views in 2 years get closed, the rules or how they are handled might not be in sync with peoples needs? – Nicklas Avén Sep 14 '18 at 18:02
  • 1
    @NicklasAvén ...and 77 upvotes on the answer and goodness knows how many other successful installations... hope you read this comment before it gets deleted like the previous set of comments on this very subject were!!! – DPSSpatial May 1 at 21:43
78

The instructions on the QGIS download site are not as intuitive as I'd like, but they do work when you know the command syntax:

First, what version of Debian Linux (Ubuntu / Mint) are you running?

The codename of your APT repository will depend on the version of the OS and which version of QGIS you can run.

QGIS 3.x will run on Ubuntu 18.04 (bionic) and Linux Mint 19 (bionic) and above.

QGIS 2.18.x will run on Ubuntu 16.04 (xenial) and Linux Mint 18.x (xenial) and below.

Find the ubuntu version you are using and associated codename to replace the code option below (first two commands).

Add links to QGIS repositories

# Replace 'codename' with your ubuntu version codename in BOTH lines below

sudo sh -c 'echo "deb http://qgis.org/debian codename main" >> /etc/apt/sources.list'  

sudo sh -c 'echo "deb-src http://qgis.org/debian codename main " >> /etc/apt/sources.list'  

wget -O - http://qgis.org/downloads/qgis-2017.gpg.key | gpg --import

gpg --fingerprint CAEB3DC3BDF7FB45

gpg --export --armor CAEB3DC3BDF7FB45 | sudo apt-key add -

Install QGIS

sudo apt-get update && sudo apt-get install qgis python-qgis  

Notes:

  • Keys last updated 09/10/2017
  • Please leave a comment if you notice they need updating again, and I will update this answer
  • I'm maintaining a version of these instructions on Github

UPDATE

If you want to use QGIS 3.x on Ubuntu 16.04 or Linux Mint 18.x, run

sudo sh -c 'echo "deb http://qgis.org/ubuntugis xenial main" >> /etc/apt/sources.list'  
sudo sh -c 'echo "deb-src http://qgis.org/ubuntugis xenial main " >> /etc/apt/sources.list'  
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update

You will be missing some of the new 3D-features, but the rest of QGIS 3 is working. The unstable is a bit misleading, they have testing and experimental PPA's for the developing side.

The QGIS ubuntugis repo is updated monthly. In case the Ubuntugis PPA offers updates, you better disable it and wait until the next QGIS point release. Otherwise you may encounter packages held back or being removed. Apart from that, ther is no "unstable" side of this PPA.

  • 2
    This worked for me, although I did replace the key 47765B75 with one that appeared when attempting the sudo apt-get update [..] the first time – Jur_ Mar 15 '16 at 9:06
  • Which might also be because I used http://qgis.org/ubuntugis. – Jur_ Mar 15 '16 at 9:15
  • 1
    Still working June 2017 on Xenial. – s.k Jun 18 '17 at 17:19
  • 1
    This is working on zesty, too now, Ubuntu 17.04 – BiggCrazy Jul 25 '17 at 7:38
  • 1
    Best solution I've seen to installing QGIS from scratch, using this process above I safely installed the GRASS plugin as well. So, the final step can include sudo apt-get update && sudo apt-get install qgis python-qgis qgis-plugin-grass! – E. Weglarz Apr 26 '18 at 17:29
30
  1. sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
  2. sudo apt-get update
  3. If you already have qgis installed:
    sudo apt-get upgrade
    If you don't already have it:
    sudo apt-get install qgis
  • 2
    Could complete the install with : sudo apt-get install python-qgis qgis-plugin-grass – egoz Feb 4 '15 at 13:55
  • Note that this should install the newest version of QGIS. Probably OK for the OP, but not for me, who try to revert to 2.6 due tu a bug in newer versions. – Pavel V. Jul 9 '15 at 9:31
  • 4
    At least with 16.10 this is old advice. The version of qgis in the repository 2.14.5 is newer than the version in ubuntugis/ubuntugis-unstable, 2.14.1. And, 2.18 is out. – Evan Carroll Oct 26 '16 at 12:08
  • @EvanCarroll Could you provide what is the correct advice for those who want to install 2.18 or newer? – Alex Spurling Oct 26 '16 at 19:20
  • Give me one hour I'll be glad to on the road – Evan Carroll Oct 26 '16 at 19:22
9

The Ubuntu and UbuntuGIS repositories really do lag very far behind the latest release of QGIS, so the best thing is to download directly from qgis.org.

Here is perhaps the simplest way to do this, assuming you already have Ubuntu Software Center:

  1. Open Ubuntu Software Center, go to Edit -> Software Sources -> Other Software -> Add, and then in the dialog for “APT line:”, add

    deb http://qgis.org/debian trusty main
    

    Then hit the ‘Add Source’ button to save, and close the dialog.

  2. Open your command line terminal (Ctrl + Alt + T), and then type

    sudo apt-get update && sudo apt-get install qgis python-qgis
    

    or if you want to install Grass as well,

    sudo apt-get update && sudo apt-get install qgis python-qgis qgis-plugin-grass
    
  • I get this when following these instructions : GPG error: qgis.org/debian xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 073D307A618E5811 W: The repository 'qgis.org/debian xenial InRelease' is not signed. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. – chrismarx Dec 12 '16 at 20:53
  • 1
    Following the answer from @DPSSpatial worked, for adding the key- – chrismarx Dec 12 '16 at 20:58

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