Why do I receive "error while loading shared libraries: libmwmclmcrrt.so.x.x" when I run my compiled application generated using MATLAB Compiler from the terminal window on the same Linux system?
47 views (last 30 days)
Show older comments
MathWorks Support Team
on 15 Sep 2022
Answered: MathWorks Support Team
on 16 Sep 2022
When attempting to run the executable, I receive the following error:
ERROR: error while loading shared libraries: libmwmclmcrrt.so.x.x: cannot open shared object: No such file or directory
Accepted Answer
MathWorks Support Team
on 27 Oct 2022
This error may occur if the environment variable LD_LIBRARY_PATH of the system is not set correctly.
When executing the application from the terminal window, the executable fails to locate the library libmwmclmcrrt.so.x.x, where x.x refers to the library for your specific release. The library exists in $MATLAB/bin/glnx64 (where $MATLAB is the MATLAB root directory)
Compare the LD_LIBRARY_PATH variable from within MATLAB, with that from the terminal window and ensure that both are the same.
At the MATLAB Command Prompt, type the following:
getenv('LD_LIBRARY_PATH')
At the system prompt, type the following:
printenv LD_LIBRARY_PATH
Verify the output is the same for both commands.
If the environment variable is not set correctly or not set at all, LD_LIBRARY_PATH should be set as described in the following documentation:
Also, ensure that the correct instance of $MATLAB/bin is on the system path and is ahead of any other instances of MATLAB installations (if any) on the same system.
0 Comments
More Answers (0)
See Also
Categories
Find more on C Shared Library Integration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!