Could not find or load the Qt platform plugin "xcb".

조회 수: 38 (최근 30일)
M
M 2017년 10월 9일
댓글: Knut Jørgen 2021년 4월 29일
Hi,
I am trying to launch an executable from Matlab.
I am using Matlab 2017b and Ubuntu 16.04 and this executable file has been compiled with ubuntu too.
When I launch this file from a terminal
./myExe
it works fine but when I launch it from Matlab I get this error :
[status, out]=system('./myExe')
status = 134
out = This application failed to start because it could not find or load the Qt platform plugin "xcb".
but I have not been able to make it work.
Thank you for any help you could provide.

채택된 답변

Carl
Carl 2017년 10월 11일
Try the steps below and see if they solve the issue:
1) Check whether the environment variables are the same when running from the terminal vs running from MATLAB. You can use the printenv or env commands (and use the system function to call them within MATLAB). In particular, look for the value of the PATH and LD_LIBRARY_PATH variables. Make sure that the necessary libraries on the terminal paths are available from MATLAB as well.
2) Try the following steps:
  • Identify the location where MATLAB is installed
  • Navigate to the sys/os/glnxa64 directory within this installation folder
  • Rename libstdc++.so.6 library to libstdc++.so.6.old
3) If you know where your QT installation is, you can try setting the following environment variable:
$ export QT_PLUGIN_PATH=<qt_base_path>/plugins

추가 답변 (1개)

M
M 2017년 10월 16일
편집: M 2018년 2월 7일
Thanks for your answer.
I got the same PATH from the terminal and from Matlab but on the linux terminal I don't have any "LD_LIBRARY_PATH" entry.
Is this the problem ?
EDIT : With a new installation of QT and Matlab, I am able to fix the problem using "LD_LIBRARY_PATH".
  댓글 수: 2
Mao Cai
Mao Cai 2017년 10월 31일
I have the similar problem which does't occur in Matlab 2017a.
The crash also happens in windows version. It seems to have relationship to image library.
But older version of 2017a is working fine.
Knut Jørgen
Knut Jørgen 2021년 4월 29일
I too have this problem. It is present with Matlab 2021a and I am using freeview from fressurfer.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by