Can't launch Qt Creator in Ubuntu 18.04

My environment initially had qt4 and Qt Creator seemed to work fine back then. I installed qt5 and after that Qt Creator does not launch anymore. Qt Creator works fine in my virtual machine however.

I tried to launch it from the terminal, but I got this error message:

Cannot mix incompatible Qt library (version 0x50905) with this library (version 0x50a01)

Qt is also installed in a chroot environment. I found out that my Qt Creator 4.5.2 is based on Qt 5.10.1, but my installed Qt version is 5.9.5.

Results of apt policy qtcreator and apt policy qt5-default from my default Ubuntu 18.04 environment. qtcreator is installed in the top level environment. Only qt5 is installed in chroot.

$ apt policy qtcreator
qtcreator: Installed: 4.5.2-3ubuntu2$ apt policy qt5-default
qt5-default: Installed: 5.9.5+dfsg-0ubuntu1
4

1 Answer

qt5-default is version 5.9.5 in Ubuntu 18.04. Open the terminal and type:

sudo dpkg --remove --force-remove-reinstreq qt5-default qtcreator 

Qt5 usually should be installed in your regular filesystem, not in a chroot environment. That way applications that depend on Qt5 like Qt Creator will be able to recognize it automatically. Otherwise you must setup a new Qt version in Qt Creator.

Setting up new Qt versions

To add a Qt version:

  1. Select Tools -> Options -> Build & Run -> Qt Versions -> click Add button.
  2. Select the Qt version to view and edit it.

    enter image description here

  3. In the Version name field, edit the name that Qt Creator suggests for the Qt version.

  4. In the qmake location field, you can change the qmake location. Change it to /usr/lib/qt5/bin/qmake as shown in the screenshot.
  5. If the Qt version is for QNX, enter the path to your installed QNX SDK in the QNX SDK field.
15

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like