error while loading shared libraries: libmwlaunchermain.so: cannot open shared object file: No such file or directory

229 views (last 30 days)
I have compiled a standalone application on Linux using the 'Application Compiler' but I am unable to run the application.
I am getting the error -
error while loading shared libraries: libmwlaunchermain.so: cannot open shared object file: No such file or directory
Kindly observe the logs for executing the app by calling the executable and shell script both, in the image attached.

Answers (1)

Nihal Reddy
Nihal Reddy on 14 Apr 2023
I understand the you facing the error "libmwlaunchermain.so: cannot open shared object file" while trying to to run an executable on Linux machine.
There can be several reasons behind this issue, the primary reason being the incorrect installation of MCR or an incorrect specification of the path to execute the .sh file.
Here are some general troubleshooting steps for resolving this issue on Linux:
1. Install a Linux version of the MCR for 2023a from
2. Please ensure that you download the correct version.
3. Extract the files and navigate to the corresponding folder; install MCR by typing “./install” on the command prompt.
4. Make sure you have sufficient privileges to run the setup. Please make note of the directory to which the MCR files are being installed to.
5. If the installation is successful for 2023a, you will see a “v81” folder created in this installation directory.
6. Run the executable with the right path specified.
You can run executable in two ways:
%first way
./executable.sh mcr_installation_dir/v81
%second way
./executable.sh $LD_LIBRARY_PATH
Where the environment variable LD_LIBRARY_PATH can be set using the following command:
In the following path, the variable <mcr_installation> refers the installation directory of your MCR-
setenv LD_LIBRARY_PATH <mcr_installation_dir> /v81/runtime/glnxa64: <mcr_installation_dir> /v81/bin/glnxa64: <mcr_installation_dir> /v81/sys/os/glnxa64:
If the above suggestions do not help, then try the following steps:
1. Check if you have a “startup.m” file that is being automatically included in your standalone application. In that case, enclose the commands within “startup.m” under a conditional statement.
2. Sometimes the 'mcrCache' is corrupted. Set the "MCR_CACHE_ROOT" environment variable to a directory that you have read and write permissions to.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!