Graphical functions crash "no Qt platform plugin could be initialized"

30 visualizaciones (últimos 30 días)
Joseph
Joseph el 22 de Ag. de 2025
Editada: Joseph el 2 de Sept. de 2025 a las 16:11
Hello
I'm encountering a crash when using graphical functions (e.g. 'plot', 'rendererinfo') on MATLAB R2025a on RHEL 9. The crash always reports:
"This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: linuxfb, minimal, offscreen, vnc, xcb."
I have attempted reinstalling, I have attempted adding several QT5 and XCB packages recommended by web searches, I have attempted various startup options and environment variables to no avail.
The workflow requires running scripts without a display but generating plots. The workflow functions properly on a different system, RHEL 7 with R2018b, but that system is being retired and replaced with the RHEL 9 system mentioned above. As a simple test case, I am able to run 'matlab -nodesktop -nodisplay -nosplash' and execute a plot command on the RHEL 7 system, but the same exact operation crashes on the RHEL 9 system.
I'd appreciate any further recommendations in troubleshooting and remedying this issue.
Thanks

Respuesta aceptada

Joseph
Joseph el 2 de Sept. de 2025 a las 16:10
Editada: Joseph el 2 de Sept. de 2025 a las 16:11
After consulting with Mathworks Technical Support I eventually discovered that there were packages required by Xvfb which were not listed among the required packages for RHEL 9 -- installing the missing packages remedied the crash.
In case anyone else comes across this issue, check for the presence of libXfont2, libXdmcp, and xkbcomp. Hopefully these will get added to the list of required packages.

Más respuestas (1)

Goutam
Goutam el 1 de Sept. de 2025 a las 9:33
Editada: Goutam el 1 de Sept. de 2025 a las 9:34
Hi Joseph,
I understand the issue you are facing a MATLAB crash with a Qt platform plugin error when attempting to use graphical functions like ‘plot’ on RHEL 9.
I have faced a similar issue in the past. The following fixes seemed to work for me at that time:
1. Set the QT_QPA_PLATFORM environment variable to ‘xcb’ Qt platform plugin before launching MATLAB:
Open a terminal and enter the following command:
export QT_QPA_PLATFORM=xcb
Then, in the same terminal session, launch MATLAB:
matlab
2. Switch to another window system, such as X11.
Hope this helps.
Regards,
Goutam

Categorías

Más información sobre Search Path en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2025a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by