Skip to content
Advertisement

After installing Qt 5.8 all qt applications stopped working

everyone!

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 libqxcb.so 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 libqxcb.so 
    linux-vdso.so.1 =>  (0x00007ffeb5fc4000)
    libQt5XcbQpa.so.5 => /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 (0x00007f9c2aa62000)
    libQt5Gui.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007f9c2a51a000)
    libQt5Core.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007f9c2a043000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f9c29cc1000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9c298f8000)
    libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f9c296f5000)
    libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007f9c294e5000)
    libxcb-render-util.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render-util.so.0 (0x00007f9c292e1000)
    libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007f9c290d8000)
    libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007f9c28ebe000)
    libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f9c28cb4000)
    libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f9c28a91000)
    libxcb-image.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-image.so.0 (0x00007f9c2888c000)
    libxcb-icccm.so.4 => /usr/lib/x86_64-linux-gnu/libxcb-icccm.so.4 (0x00007f9c28687000)
    libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007f9c2847f000)
    libxcb-xfixes.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007f9c28277000)
    libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007f9c28073000)
    libxcb-randr.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-randr.so.0 (0x00007f9c27e64000)
    libxcb-shape.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shape.so.0 (0x00007f9c27c60000)
    libxcb-keysyms.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-keysyms.so.1 (0x00007f9c27a5d000)
    libxcb-xkb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-xkb.so.1 (0x00007f9c27841000)
    libxkbcommon-x11.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so.0 (0x00007f9c27639000)
    libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f9c273f6000)
    libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f9c2714b000)
    libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f9c26e3a000)
    libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f9c26b00000)
    libxkbcommon.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007f9c268c0000)
    libQt5DBus.so.5 => /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5 (0x00007f9c26842000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9c26625000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9c2631b000)
    libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007f9c260f6000)
    libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007f9c25e97000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f9c25c7d000)
    libGL.so.1 => /usr/lib/nvidia-375/libGL.so.1 (0x00007f9c259d9000)
    libicui18n.so.55 => /usr/lib/x86_64-linux-gnu/libicui18n.so.55 (0x00007f9c25576000)
    libicuuc.so.55 => /usr/lib/x86_64-linux-gnu/libicuuc.so.55 (0x00007f9c251e2000)
    libpcre16.so.3 => /usr/lib/x86_64-linux-gnu/libpcre16.so.3 (0x00007f9c24f7c000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9c24d77000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f9c24b6f000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f9c24959000)
    /lib64/ld-linux-x86-64.so.2 (0x000055a753a16000)
    libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f9c24746000)
    libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f9c24541000)
    libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f9c2433c000)
    libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f9c24136000)
    libxcb-util.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-util.so.1 (0x00007f9c23f30000)
    libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f9c23d06000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f9c23a96000)
    libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f9c23849000)
    libgraphite2.so.3 => /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007f9c23624000)
    libGLX.so.0 => /usr/lib/nvidia-375/libGLX.so.0 (0x00007f9c233f3000)
    libGLdispatch.so.0 => /usr/lib/nvidia-375/libGLdispatch.so.0 (0x00007f9c23125000)
    libicudata.so.55 => /usr/lib/x86_64-linux-gnu/libicudata.so.55 (0x00007f9c2166e000)
    libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f9c215e8000)
    libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f9c213c6000)
    liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f9c211a3000)
    libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f9c20ec2000)
    libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f9c20cae000)

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

Finally, I have found that libqxcb.so (which is in /path/to/qt/plugins/platforms/) uses its own paths and that libraries libQt5DBus.so.5 and libQt5XcbQpa.so.5 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.

Advertisement

Answer

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

Advertisement