Creating 'LD_LIBRARY_PATH' for MATLAB runtime conflicts with QT

조회 수: 9 (최근 30일)
Atin
Atin 2023년 3월 20일
답변: Vinayak Gupta 2023년 4월 6일
Hi,
I created 'LD_LIBRARY_PATH' environment variable, by adding an export statament in .bashrc, for my MATLAB exectuable file to run properly.
atinxx@xxx:~$ echo $LD_LIBRARY_PATH
/usr/local/MATLAB/MATLAB_Runtime/R2023a/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/R2023a/bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/R2023a/sys/os/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/R2023a/extern/bin/glnxa64
However, this variable is causing some conflict with another pllication and giving following error -
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Although, this warning was given in MATLAB's documentation - 'Set MATLAB Runtime Path for Deployment', now I am tring to find a solution for this.
I am using Debian 10.
In a nutshell,
  1. I have an executable file
  2. Installed MATLAB Runtime for executing the file
  3. Created 'LD_LIBRARY_PATH' environment variable, which was not present earlier
  4. Now, it conflicts with another application giving an error
  5. Deleting 'LD_LIBRARY_PATH' environment variable, makes the other application work perfectly
  6. But now I cannot execute the MATLAB executable file!
It would be great if anyone can help!
  댓글 수: 1
Atin
Atin 2023년 3월 22일
Is there any way to run it without MATLAB Runtime in order to avoid this conflict? I have MATLAB already installed on my linux machine

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

답변 (1개)

Vinayak Gupta
Vinayak Gupta 2023년 4월 6일
Hi Atin
It is currently not possible to run a standalone application within MATLAB as they are designed to be shared and run without the MATLAB installation.
It seems like you might be overwriting the 'LD_LIBRARY_PATH' variable instead of appending to it. Instead try appending to it using:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/MATLAB/MATLAB_Runtime/R2023a/runtime/glnxa64
Even if it still conflicts with other application, you might need to write a small script with temporary sets the variable before execution of the MATLAB executable.

카테고리

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

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by