Matlab Runtime correct version installed on Linux environment but getting error message could not find the correct version.
Show older comments
I had installed Matlab Runtime environment version v911 and can see folders and libraries inside the default installation path on a linux pc ("/usr/local/MATLAB/MATLAB_Runtime"), Also added library_path correctly , when tried to run one code which uses the compiled libraries i am seeing an error like this any help
Error: Could not find version 9.11 of the MATLAB Runtime.
Attempting to load libmwmclmcrrt.so.9.11.
Please install the correct version of the MATLAB Runtime.
Contact your vendor if you do not have an installer for the MATLAB Runtime
Answers (1)
Swastik Sarkar
on 16 Jun 2025
0 votes
The issue may stem from an incorrect configuration of the LD_LIBRARY_PATH environment variable when executing the binary. This variable defines the directories where the system looks for runtime libraries.
Further information can be found in the following MATLAB Answer:
It is possible that incompatible or unintended library versions are listed earlier in the LD_LIBRARY_PATH than the version required by the binary. Placing the correct library paths at the beginning of the variable may help ensure that the appropriate versions are used.
I hope this helps resolve the issue and enables the binary to run as expected.
11 Comments
nikhil koyyodan
on 17 Jun 2025
Swastik Sarkar
on 17 Jun 2025
Edited: Swastik Sarkar
on 17 Jun 2025
Since LD_LIBRARY_PATH is not set, the export statement would resolve to only the new path you specified, resulting in a trailing colon at the end. This trailing colon may be causing the issue.
In your case, the path resolves to:
/usr/local/MATLAB/Matlab_Runtime/v911/runtime/glnxa64: /usr/local/MATLAB/Matlab_Runtime/v911/bin/glnxa64:/usr/local/MATLAB/Matlab_Runtime/v911/sys/os/glnxa64:/usr/local/MATLAB/Matlab_Runtime/v911/sys/opengl/lib/glnxa64:/usr/local/MATLAB/Matlab_Runtime/v911/extern/bin/glnxa64:
Please note the trailing colon at the end of the path. This can lead to unexpected behavior. Kindly remove the $LD_LIBRARY_PATH reference along with the trailing colon from your export statement, and then try running the binary again.
Additionally, I noticed a space after the first colon in your original path. If this was not intentional, please ensure that there are no spaces between the path components separated by colons.
Following is the official MathWorks Documentation to setup MCR to run with applications:
nikhil koyyodan
on 18 Jun 2025
Swastik Sarkar
on 18 Jun 2025
Could you please share the compiled application by attaching it here? This would help us reproduce the issue and assist more effectively.
nikhil koyyodan
on 18 Jun 2025
Swastik Sarkar
on 20 Jun 2025
Edited: Swastik Sarkar
on 20 Jun 2025
If you are using sudo, please try changing the command to the following and let us know of the results:
sudo -E ./file
The argument -E preserves environment variables while executing the program
nikhil koyyodan
on 20 Jun 2025
nikhil koyyodan
on 20 Jun 2025
nikhil koyyodan
on 20 Jun 2025
nikhil koyyodan
on 20 Jun 2025
Swastik Sarkar
on 20 Jun 2025
That's awesome !
If you can, please do let us know what different you have done apart from the above steps.
Categories
Find more on Software Development Tools 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!