Creating 'LD_LIBRARY_PATH' for MATLAB runtime conflicts with QT

23 次查看(过去 30 天)
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