Matlab Runtime correct version installed on Linux environment but getting error message could not find the correct version.

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

Respuestas (1)

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 comentarios

hi , i am still facing same error message ,LD_LIBRARY path i added i checked any unintended version is there by checking $LD_LIBRARY_PATH but it was blank, later i added the path using export LD_LIBRARY_PATH=/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:$LD_LIBRARY_PATH then i tried to run the code but getting error like ("error while loading shared libraries:libmwlaunchermain.so cannot find shared object file no such files or directory , i understood its a path issue and added the lib path in /etc/ld.so.conf file and then its atleast taking libraries it seems but getting another error like this 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.
which i mentioned above.
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:
i had removed the end colon and $LD_LIBRARY_PATH but still seeing the same error, now when i do echo $LD_LIBRARY_PATH i am getting like this
/tool# echo $LD_LIBRARY_PATH
/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
error message
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.
Also i want to export LD_PRELOAD i added like this is this fine
export LD_PRELOAD=/usr/local/MATLAB/MATLAB_Runtime/v911/bin/glnxa64/glibc-2.17_shim.so
Could you please share the compiled application by attaching it here? This would help us reproduce the issue and assist more effectively.
ok, pls try to run by giving sudo ./file and see if you are also getting the error in linux system.
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
Hi @Swastik Sarkar tried running with sudo -E ./file , still seeing the same error
/tool# echo $LD_LIBRARY_PATH
/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
/tool# sudo -E ./file
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.
if i try without sudo append eg (./file) its checking some libfiles in my present working directory and giving another error message,as no lib files are in my PWD.
libmat.so: cannot open shared object file: No such file or directory
Error: mclmcr initialization failed
Hi @Swastik Sarkar ,is this path issue when trying to load libmwmclmcrrt.so.9.11 its seeing this issue right..also when i tried command line (ldd ./file) it showed the paths correctly from my PWD
/tool# ldd ./file(not the correct name)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f18273d7000)
libmwi18n.so => /usr/local/MATLAB/MATLAB_Runtime/v911/bin/glnxa64/libmwi18n.so (0x00007f182784d000)
libmwfoundation_filesystem.so => /usr/local/MATLAB/MATLAB_Runtime/v911/bin/glnxa64/libmwfoundation_filesystem.so (0x00007f1827f05000)
libmwctfdatainterfaces.so => /usr/local/MATLAB/MATLAB_Runtime/v911/bin/glnxa64/libmwctfdatainterfaces.so (0x00007f1827ecf000)
libmwctfpackage.so => /usr/local/MATLAB/MATLAB_Runtime/v911/bin/glnxa64/libmwctfpackage.so (0x00007f1827e0a000)
libmwmcli18nutil.so => /usr/local/MATLAB/MATLAB_Runtime/v911/bin/glnxa64/libmwmcli18nutil.so (0x00007f1827e06000)
libmwmclmcrrt.so.9.11 => /usr/local/MATLAB/MATLAB_Runtime/v911/runtime/glnxa64/libmwmclmcrrt.so.9.11 (0x00007f1827da5000)
libmwopccore.so => /usr/local/MATLAB/MATLAB_Runtime/v911/bin/glnxa64/libmwopccore.so (0x00007f1827353000)
libmwopcmodel.so => /usr/local/MATLAB/MATLAB_Runtime/v911/bin/glnxa64/libmwopcmodel.so (0x00007f182724e000)
libmwopczippackage.so => /usr/local/MATLAB/MATLAB_Runtime/v911/bin/glnxa64/libmwopczippackage.so (0x00007f1827824000)
libmwfoundation_log.so => /usr/local/MATLAB/MATLAB_Runtime/v911/bin/glnxa64/libmwfoundation_log.so (0x00007f182711c000)
libmwcpp11compat.so => /usr/local/MATLAB/MATLAB_Runtime/v911/bin/glnxa64/libmwcpp11compat.so (0x00007f18270f8000)
libmwboost_log.so.1.72.0 => /usr/local/MATLAB/MATLAB_Runtime/v911/bin/glnxa64/libmwboost_log.so.1.72.0 (0x00007f1826e00000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1826d19000)
tool# ldconfig -p | grep libmwmclmcrrt.so.9.11
libmwmclmcrrt.so.9.11 (libc6,x86-64) => /usr/local/MATLAB/MATLAB_Runtime/v911/runtime/glnxa64/libmwmclmcrrt.so.9.11
Hi @Swastik Sarkar, i am able to run now some path related issue only. thanks
That's awesome !
If you can, please do let us know what different you have done apart from the above steps.

Iniciar sesión para comentar.

Categorías

Más información sobre Software Development Tools en Centro de ayuda y File Exchange.

Preguntada:

el 12 de Jun. de 2025

Comentada:

el 20 de Jun. de 2025

Community Treasure Hunt

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

Start Hunting!

Translated by