[HowTo] Fix "Cannot mix incompatible Qt library"

Difficulty: ★☆☆☆☆

Where does the error come from?

As the message suggests, the error comes from a difference in Qt library versions used for building and then running applications.

qt5-styleplugins moved to AUR

In Manjaro, this error started occurring “regularly” following the deprecation of qt5-styleplugins.
That package was previously used, among other cases, for applying GTK2 style to Qt applications running in GTK environment (Gnome, Xfce…). Following the drop of GTK2 support upstream, that package became deprecated, and was then moved to AUR.

Qt updates and AUR

Now being demoted to AUR, the package is no longer officially maintained by neither Arch or Manjaro. Consequently, it is no longer rebuilt by the maintainers with every Qt update, contrarily to Qt-based applications still in the repositories. Yet, in order to keep working with other Qt applications, it still needs to be rebuilt so, though now as an AUR package, it is the users’ responsibility to do so.

How to fix it?

There are two simple solutions for that, depending on your use of that package.

If you apply GTK2 style to Qt applications

You need to rebuild it yourself after each Qt update.

pamac build qt5-styleplugins

If you do not have any use for it

You can then simply remove it.

sudo pacman -R qt5-styleplugins

If you don’t have qt5-styleplugins installed

That package is highlighted here as the most common source of that error. But the logic here applies the very same way for any Qt based package from AUR you may have installed.

If in the exceptional case you find the issue comes from a package from the repositories, you shall then notify the maintainers into updating it: Packaging - Manjaro Linux Forum


Thanks for the guide. It helped me solve this problem. One question though. Shouldn’t the app developer eventually move off this old QT software since it’s been phased out? Meaning eventually this won’t be an issue for users down the road to take this manual action. I’m not a developer so it may sound like a dumb question. And probably a question only each app developer can answer. I’m just surprised when I ran updates today how many of my apps broke.

kvantum is now preferred for setting a theme to Qt applications in a GTK environment.

Also, as already stated, the rebuild requirement may concern any Qt application in AUR, whether it is deprecated or has simply never been added to the main repositories.