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 nyalldawson.net 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 libpython2.7.so 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/libpython2.7.so /usr/lib/libpython2.7.so sudo ldconfig
sudo ldconfig

Update from Nyal Dawson: change the PYTHON_LIBRARY option:

from: /usr/lib/libpython2.7.so
to:   /usr/lib/x86_64-linux-gnu/libpython2.7.so

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

About these ads

About pvanb

I am a tropical forest ecologist with a focus on spatial and temporal patterns and processes at population and ecosystem level. I am furthermore very interested in issues related to conservation and sustainable use of biodiversity and natural resources under current and future climates. I have worked in the Middle East (Syria and Lebanon) and South America (Brazil) and in Eastern Africa (Kenya).
This entry was posted in GIS, QGIS and tagged , , . Bookmark the permalink.

8 Responses to Building QGIS on Ubuntu 13.04

  1. Pingback: Building QGIS on Ubuntu 13.04 | nyalldawson.net

  2. Nyall Dawson says:

    Thanks for the improved solution to the qt4/5 qmake switch. I’ve updated my post to point here for that answer!

  3. clogri says:

    Sorry, I am not an expert…
    Can you indicate where do I need the configuration parameters changes (first operation)?
    Thanks

    • pvanb says:

      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 (http://www.cmake.org/), which gives you a nice GUI interface.

  4. matt says:

    Hi,

    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: http://qgismalaysia.blogspot.de/2013/04/ubuntu-1304-and-qgis.html
    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 (http://www.qgis.org/api/INSTALL.html) 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,
    Matt

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

  6. Stanrley says:

    Hi

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

    “Please install scipy (http://scipy.org/) in your QGIS python path.”
    And

    “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:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s