Building QGIS on Ubuntu 13.04

Always one of those dreaded moments after updating Ubuntu, to 13.04 this time. Will QGIS compile properly. Not as it turned out, but the solutions were easy and quick, thanks to posts on and boringnerdystuff.

Ubuntu 13.04 defaults to Qt 5. You could solve this by changing back to Qt4, but as one pointed out in the comments on Nyall Dawson’s post, making system-wide changes to compile a single piece of software might be a bit of an overkill. Instead, what worked for me was to change in the configure options:

from: -DQMAKE_EXECUTABLE=/usr/bin/qmake
to:   -DQMAKE_EXECUTABLE=/usr/bin/qmake-qt4

You may also need to set -DQT_INCLUDE_DIR=/usr/include/qt4 as suggested in the above-mentioned comment. In my case it was already set, so I didn’t need to change it.

The next error was that was not found in /usr/lib. Following Nyal Dawson’s suggestion, I found it in /usr/lib/x86_64-linux-gnu/.

Creating a softlink did the trick: ln -sf /usr/lib/x86_64-linux-gnu/ /usr/lib/ sudo ldconfig
sudo ldconfig

Update from Nyal Dawson: change the PYTHON_LIBRARY option:

from: /usr/lib/
to:   /usr/lib/x86_64-linux-gnu/

And now QGIS is up and running again :-), thanks to the above-mentioned two posts.


8 thoughts on “Building QGIS on Ubuntu 13.04

  1. Pingback: Building QGIS on Ubuntu 13.04 |

    1. pvanb

      you can change the configuration when running ccmake or cmake from the command line (you need to be in the folder with the source code). Or install cmake (, which gives you a nice GUI interface.

  2. matt


    thanks for your article! Unfortunately, I do not manage to get the installation to work on my Ubuntu 13.04 with the latest QGIS nightly build.
    I first tried the Synaptic based install described here:
    That didn’t work (as expected) because there were some problems with the python-qgis or pyspatialite stuff. While QGIS basically started up O.K. it came completely without Python support (no plugins etc.)

    Now I wanted to try to *really* build the sources myself but don’t know how to do it properly. Could you give a bit more information on the neccessary steps? I tried this ( step-by-step manual but it doesn’t say anything (yet?) about the dependencies for raring so I tried precise – which failed right from the start. Also I am not familiar with cmake.

    Any information on this complicated installation process is highly appreciated! I urgently need QGIS 1.9 for its hstore support.

    Thanks a lot and best regards,

  3. Pingback: QGIS não executa complementos Python no Ubuntu 13.04 | Geotecnologias para Linux

  4. Stanrley


    Please, How do i to prooceed in win7. In my pc appear the phrase mean:

    “Please install scipy ( in your QGIS python path.”

    “Unable to load LecoS additions due a error at to call classFactory() method
    Traceback (most recent call last):…”

    Can someone me hold?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s