Why do I receive a "The file is not a valid MATLAB Runtime installer for this version of MATLAB" error when trying to create a MATLAB Compiler installer with integrated MATLAB Runtime?

53 views (last 30 days)
I want to compile my MATLAB code into a standalone installer with "Runtime included in package". I already downloaded the MATLAB Runtime through my web browser so I then choose to specify the location of the already downloaded runtime. If I then refer to my downloaded installer in the MATLAB Preferences, however, a dialog is shown with the following message:
ERROR: The file is not a valid MATLAB Runtime installer for this version of MATLAB.
I am quite sure though I downloaded the runtime for the correct MATLAB release.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 22 Jun 2022
Edited: MathWorks Support Team on 22 Jun 2022
This error may indicate that there is a mismatch in Update levels. For example, you are running MATLAB R2022a Update 2 but you are referring to MATLAB Runtime R2022a Update 3.
Note that when you download the MATLAB Runtime from the website, you always get the latest Update of the release you choose. 
While it is possible to run applications with a MATLAB Runtime update level that is newer than the MATLAB release used to build the application, we do specifically want to include the MATLAB Runtime version which exactly matches the MATLAB Release and Update when creating "Runtime included in package" installers.
To download the exact correct MATLAB Runtime version for your MATLAB installation, either use:
>> compiler.runtime.download
in that specific MATLAB installation, to actually let MATLAB download the installer for you. In R2020a, we enhanced compiler.runtime.download to output the URL if the machine cannot access it directly.
Or, run:
>> com.mathworks.toolbox.compiler.MatlabRuntimeUtils.getMCRInstallerDownloadURL()
to obtain an URL which you can then open in a web browser to download the correct version.

More Answers (0)

Tags

No tags entered yet.

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!