Software⏱️ 2 min read📅 2026-05-31

How to Fix: "Failed to load platform plugin "xcb" " while launching qt5 app on linux without qt installed

Failed to load platform plugin xcb while launching qt5 app on linux without qt installed

Quick Answer: Create a custom platform plugin by copying the xcb plugin from the Qt installation directory and modifying it to point to the correct location.

To resolve the "Failed to load platform plugin "xcb" " error when launching a Qt5 app on Linux without Qt installed, follow these steps:

🛑 Root Causes of the Error

  • Qt5 requires platform plugins to be installed and configured correctly.

🔧 Proven Troubleshooting Steps

Method 1: Copying Platform Plugin Files

  1. Step 1: Create a new directory named "platforms" in the Qt installation directory (e.g., /usr/lib/x86_64-linux-gnu/qt5/plugins).

Method 1: Copying Platform Plugin Files

  1. Step 2: Copy the "libqxcb.so" file from the Qt installation directory to the newly created "platforms" directory.

Method 1: Copying Platform Plugin Files

  1. Step 3: Restart the Qt application or the Linux system to ensure the changes take effect.

💡 Conclusion

By following these steps, you should be able to resolve the "Failed to load platform plugin "xcb" " error and launch your Qt5 app on Linux without Qt installed.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions