Deployment Failures
After the application is working on the test machine, failures can be isolated in
end-user deployment. The end users of your application need to install MATLAB® Runtime on their machines. MATLAB Runtime includes a set of shared libraries that provides support for all features
of MATLAB. If your application fails during end-user deployment, the following
questions may help you isolate the problem.
Note
There are a number of reasons why your application might not deploy to end users,
after running successfully in a test environment. For a detailed list of guidelines
for writing MATLAB code that can be consumed by end users, see Write Deployable MATLAB Code
Is MATLAB Runtime installed?
If running on Linux or macOS, did you update the dynamic library path after installing MATLAB Runtime?
Do you receive an error message about a missing DLL?
Error messages indicating missing DLLs such as
mclmcrrtX_XX
.dll
or
mclmcrrtX_XX
.so
are generally
caused by an incorrect installation of MATLAB Runtime. For information on installing MATLAB Runtime, see Install and Configure MATLAB Runtime.
It is also possible that MATLAB Runtime is installed correctly, but the
PATH
,LD_LIBRARY_PATH
, or
DYLD_LIBRARY_PATH
variable is set incorrectly. For
information on setting environment variables, see Set MATLAB Runtime Path for Deployment.
Caution
Do not solve these problems by moving libraries or other files within the
MATLAB Runtime folder structure. The MATLAB Runtime system is designed to accommodate different MATLAB Runtime versions operating on the same machine. The folder structure
is an important part of this feature.
Do you have write access to the necessary folders?
The first operation attempted by an application with compiled MATLAB code is extraction of the deployable archive. If the archive is not
extracted, the application cannot access the compiled MATLAB code and the application fails.
There are three possible folders where the deployable archive is extracted:
If the deployable archive is embedded and you are using the default
environment settings, the archive extracts into the current user’s temp
folder.
If the deployable archive is embedded and you set the environment variable
MCR_CACHE_ROOT
, the archive extracts into the folder
specified by MCR_CACHE_ROOT
.
If the deployable archive is not embedded, the archive extracts into the
current folder of the component.