jimbo
This issue is common on systems using FreeBSD 14.x, including GhostBSD 25.01. It is caused by missing or incompatible runtime libraries related to Qt and the XCB plugin.
Solution Steps
1. Install Required Runtime Libraries
Ensure the following packages are installed:
- qt5
- qt5-x11extras
- qt5-gui
For applications using Qt6 (such as LibreOffice version 7.6 and later), also install:
2. Set the Platform Plugin Path Manually
Some applications may not detect the correct plugin directory automatically. To work around this, set the environment variable QT_QPA_PLATFORM_PLUGIN_PATH
to point to the appropriate plugin directory.
For Qt5 applications:
- Set the variable to
/usr/local/lib/qt5/plugins/platforms
- Then launch the application
For Qt6 applications:
- Set the variable to
/usr/local/lib/qt6/plugins/platforms
- Then launch the application
This can be tested manually before applying it system-wide.
3. Inspect and Correct Environment Variables
Check for any environment variables that may conflict with proper Qt operation. Look especially for those related to Qt or XCB. If any are incorrectly set, clear them or set them properly. Also ensure that the DISPLAY
variable is correctly assigned (usually :0
when using X11).
4. Rebuild Qt and XCB Packages if Needed
If issues persist, the problem may be due to version mismatches or corrupted libraries. Reinstall or upgrade all Qt and XCB-related packages to ensure they are in sync and up to date.
Optional: Confirm Plugin Availability
Check whether the file libqxcb.so
exists under the following directory:
/usr/local/lib/qt5/plugins/platforms
for Qt5
/usr/local/lib/qt6/plugins/platforms
for Qt6
If this file is missing, the appropriate platform plugin package was not installed correctly.