Skip to content

After installing Qt 5.8 all qt applications stopped working


I have got a bit of a problem. My OS is Ubuntu 16.04 LTS x64. Apt provide only Qt 5.5.1 as the latest version, but I needed to install Qt above 5.6 (I have gone with Qt 5.8) because I needed to compile one of the in-house tools (which require Qt >=5.6).

But after installing Qt 5.8 (unfortunately, I used the installer, which was suggested on their website rather than compile it from git repository) I have done a strategic mistake. The system did not pick it up, but instead of setting an extra profile for qtchooser, I decided to copy all libraries to /usr/bin/x86_64-linux-gnu, including changing all libQt5*.so.5 symbolic links. I do not know why did I do it… Possibly, I was drunk, or just too tired… But now I realise, that it was stupid.

After that I deinstalled Qt5.8 leaving the original Qt5.5.1 and Qt 4.8.7 (both installed through apt).

The problem is that after that all (at least, seems all) qt applications, that came from apt repository stopped working with the following error:

:~$ retext
Using configuration file: ~/.config/ReText project/ReText.conf
This application failed to start because it could not find or load the       Qt platform plugin "xcb".

Reinstalling the application may fix this problem.
Aborted (core dumped)

I tested retext, qbittorrent, vlc… And, obviously, I tried to reinstall each of these applications. It did not help me.

I have seen several questions and tutorials regarding specifically this type of errors, but most of them recommend to check library in /path/to/qt/plugins/platforms/ and check whether it misses any dependencies. Restoring dependencies helped everybody. But not me. Here is list of dependencies:

:/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms$ ldd =>  (0x00007ffeb5fc4000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c2aa62000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c2a51a000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c2a043000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c29cc1000) => /lib/x86_64-linux-gnu/ (0x00007f9c298f8000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c296f5000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c294e5000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c292e1000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c290d8000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c28ebe000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c28cb4000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c28a91000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c2888c000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c28687000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c2847f000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c28277000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c28073000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c27e64000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c27c60000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c27a5d000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c27841000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c27639000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c273f6000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c2714b000) => /lib/x86_64-linux-gnu/ (0x00007f9c26e3a000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c26b00000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c268c0000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c26842000) => /lib/x86_64-linux-gnu/ (0x00007f9c26625000) => /lib/x86_64-linux-gnu/ (0x00007f9c2631b000) => /lib/x86_64-linux-gnu/ (0x00007f9c260f6000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c25e97000) => /lib/x86_64-linux-gnu/ (0x00007f9c25c7d000) => /usr/lib/nvidia-375/ (0x00007f9c259d9000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c25576000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c251e2000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c24f7c000) => /lib/x86_64-linux-gnu/ (0x00007f9c24d77000) => /lib/x86_64-linux-gnu/ (0x00007f9c24b6f000) => /lib/x86_64-linux-gnu/ (0x00007f9c24959000)
    /lib64/ (0x000055a753a16000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c24746000) => /lib/x86_64-linux-gnu/ (0x00007f9c24541000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c2433c000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c24136000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c23f30000) => /lib/x86_64-linux-gnu/ (0x00007f9c23d06000) => /lib/x86_64-linux-gnu/ (0x00007f9c23a96000) => /lib/x86_64-linux-gnu/ (0x00007f9c23849000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c23624000) => /usr/lib/nvidia-375/ (0x00007f9c233f3000) => /usr/lib/nvidia-375/ (0x00007f9c23125000) => /usr/lib/x86_64-linux-gnu/ (0x00007f9c2166e000) => /lib/x86_64-linux-gnu/ (0x00007f9c215e8000) => /lib/x86_64-linux-gnu/ (0x00007f9c213c6000) => /lib/x86_64-linux-gnu/ (0x00007f9c211a3000) => /lib/x86_64-linux-gnu/ (0x00007f9c20ec2000) => /lib/x86_64-linux-gnu/ (0x00007f9c20cae000)

Then there were also recommendations to reinstall packages libQt5Gui5, which I also did, which did not help either.

Finally, I have found that (which is in /path/to/qt/plugins/platforms/) uses its own paths and that libraries and should be located in the same directory. Even though all the dependencies seems satisfied, I decided to try it as well. No luck again.

If anyone have any idea what else can be wrong and how this situation can be resolved, please, share it [idea]. I will really appreciate any help.

Thank you very much in advance.

Best regards.



“how this situation can be resolved” Roll back to the LVM snapshot you took before you started messing with it?

I guess if you have to ask, you don’t leverage LVM, so now you will know that it’s not there to be a nuisance, but to prevent major breakage.

  1. Ensure you have your filesystem on an LVM volume, and there’s space left for snapshots. Most distributions hopefully set up LVM for you already, so if you have no space left you’ll have to downsize the filesystem to free up some space. Otherwise, you’ll have to convert your disks to LVM. Use the systemrescuecd, or any other good live distro, to do that.

  2. Take a snapshot.

  3. Forcibly remove the system Qt packages (all of them).

  4. Forcibly reinstall the system Qt packages.

  5. Verify that the system Qt applications now work.

  6. Take a snapshot.

  7. Reinstall Qt in your home folder.

  8. Ensure everything still works and you can use your new Qt.

  9. Drop snapshots if you wish to.