I have installed Qt5 from the Qt5 project site, to the following directory


I would also like to mention that I had Qt4 installed previously, I have removed all instances of Qt4 through the software center.

Now that I issue designer from the command prompt, the system gives the following error:

designer: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/designer': No such file or directory

What can be done to correct this problem?

  • 1
    Qt5 is packaged and available in the archives for Ubuntu 13.10. Why didn't you install it from there?
    – dobey
    Mar 17, 2014 at 18:41
  • 2
    And if you need the latest Qt 5.2.1, it's now available in the 14.04 development version Mar 17, 2014 at 20:12

4 Answers 4


Replace Default Qt version paths in:

or in newer releases /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf:



qtchooser -print-env

Reference: man qtchooser

  • 3
    Actually the file /usr/lib/x86_64-linux-gnu/qtchooser/default.conf is a symlink to the one in /usr/share/qtchooser/default.conf
    – Anwar
    Jun 10, 2017 at 5:55

Proper path to qt default config: /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf

  • 2
    You may want to suggest this as an edit to the other answer. The answer section should be reserved for entire answers. Mar 21, 2015 at 1:42
  • Yes qtchooser will look at the default.conf, you can create a symlink ln -s /usr/lib/x86_64-linux-gnu/qtchooser/qt5.conf /usr/lib/x86_64-linux-gnu/qtchooser/default.conf Aug 4, 2017 at 22:15

For all of those who didn't uninstal old version and are wondering how to change the qt directory location. The correct way is to export the QT_SELECT variable and add the custom ~/.config/qtchooser/somename.conf file.

This will be a qt installation visible in qtchooser -l under "somename". So that:

 QT_SELECT=somename; qtchooser -print-env 

Will return your custom location. The downside of changing the default.conf is that it might invalidate where your old qt version is found, when I did change it to /some/path, after executing:

QT_SELECT=qt4; qtchooser -print-env

It find the newer version on my path, however with the ~/config/qtchooser/somename.conf the earlier version is intact.

It is mentioned at the end of the man qtchooser help:

FILES /etc/xdg/qtchooser/*.conf System-wide configuration files. Each has two lines, the first is the path to the binaries and the second is the path to the Qt libraries. If a default.conf is provided, the settings from it will be automatically used in case nothing else is selected.

$HOME/.config/qtchooser/*.conf configuration files


I tried the answers suggesting to check the configuration in the qtchooser, but I didn't manage to get it to work. The solution that worked for me was simply to add the right qt version to PATH. 5.11 in my case.

export PATH="/opt/qt511/bin:$PATH"

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.