I'm trying to develop a KDE widget that should display a map. At the moment I can't get the widget to load, because of the errors module "QtLocation" is not installed and module "QtPositioning" is not installed.

I'm running Ubuntu 18.04. Looking at this page, I've made sure that libqt5positioning5 and libqt5location5 are installed. The widget still does not load with the above errors.

On reddit someone told me that I also need to install the QML bindings. What are the package names I need?


As you are talking about developing, in other words about programming, then you need to install development packages with headers:

  • qtlocation5-dev for /usr/include/x86_64-linux-gnu/qt5/QtLocation/QtLocation;
  • qtpositioning5-dev for /usr/include/x86_64-linux-gnu/qt5/QtPositioning/QtPositioning.

Install them along with QML bindings with

sudo apt install qtlocation5-dev qtpositioning5-dev 
sudo apt install qml-module-qtlocation qml-module-qtpositioning

Next time you can use the file search on packages.ubuntu.com.

  • This didn't work: I still got the same error! I believe your answer is incomplete. As I'm using QML to develop the widget, your answer made me realize that the binding might not be under the qt5 name. Indeed, searching this page I found the packages qml-module-qtlocation and qml-module-qtpositioning. After installing them, the widget started working. Please, if you could update your answer with these informations for future users, I will gladly accept it. Thank you! :) – Davide_sd Feb 5 '19 at 21:14

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.