Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Install and Configure the MATLAB Runtime

Download the MATLAB Runtime Installer from the Web

Download the MATLAB® Runtime from the website at http://www.mathworks.com/products/compiler/mcr.

Install the MATLAB Runtime Interactively

To install the MATLAB® Runtime:

  1. Unzip/Extract the archive containing the MATLAB Runtime installer.

    PlatformSteps
    Windows®

    Double-click the self-extracting MATLAB Runtime installer that you downloaded from the web.

    For example, an R2017b runtime will have the name MCR_R2017b_win64_installer.exe. Double clicking the installer extracts the necessary files and automatically starts the installer.

    Linux®

    Unzip the MATLAB Runtime installer at the terminal using the unzip command.

    For example, if you are unzipping the R2017b MATLAB Runtime installer, at the Terminal, type:

    unzip MCR_R2017b_glnxa64_installer.zip

    macOS

    Unzip the MATLAB Runtime installer at the terminal using the unzip command.

    For example, if you are unzipping the R2017b MATLAB Runtime installer, at the Terminal, type:

    unzip MCR_R2017b_maci64_installer.dmg.zip

    Note

    The release part of the installer filename (_R2017b_) will change from one release to the next.

  2. Start the MATLAB Runtime installer.

    PlatformSteps
    Windows

    Installer automatically starts after completing the previous step.

    Linux

    At the Terminal, type:

    sudo ./install

    Note

    On Debian® based Linux distributions, you will need to type:

    gksudo ./install

    macOS

    At the Terminal, type:

    ./install

    Note

    You may need to enter an administrator username and password after you run ./install.

  3. When the MATLAB Runtime installer starts, it displays a dialog box. Read the information and then click Next to proceed with the installation.

  4. Specify the folder in which you want to install the MATLAB Runtime in the Folder Selection dialog box.

    Note

    On Windows systems, you can have multiple versions of the MATLAB Runtime on your computer but only one installation for any particular version. If you already have an existing installation, the MATLAB Runtime installer does not display the Folder Selection dialog box because you can only overwrite the existing installation in the same folder.

  5. Confirm your choices and click Next.

    The MATLAB Runtime installer starts copying files into the installation folder.

  6. On Linux and macOS platforms, after copying files to your disk, the MATLAB Runtime installer displays the Product Configuration Notes dialog box. This dialog box contains information necessary for setting your path environment variables. Copy the path information from this dialog box and then click Next.

  7. Click Finish to exit the installer.

Install the MATLAB Runtime Non-Interactively

To install the MATLAB Runtime without having to interact with the installer dialog boxes, use one of the MATLAB Runtime installer’s non-interactive modes:

  • silent—the installer runs as a background task and does not display any dialog boxes

  • automated—the installer displays the dialog boxes but does not wait for user interaction

When run in silent or automated mode, the MATLAB Runtime installer uses default values for installation options. You can override these defaults by using MATLAB Runtime installer command-line options or an installer control file.

Note

When running in silent or automated mode, the installer overwrites the default installation location.

Running the Installer in Silent Mode

To install the MATLAB Runtime in silent mode:

  1. Extract the contents of the MATLAB Runtime installer file to a temporary folder, called $temp in this documentation.

    Note

    On Windows systems, manually extract the contents of the installer file.

  2. Run the MATLAB Runtime installer, specifying the -mode option and -agreeToLicense yes on the command line.

    Note

    On most platforms, the installer is located at the root of the folder into which the archive was extracted. On Windows 64, the installer is located in the archives bin folder.

    PlatformCommand
    Windowssetup -mode silent -agreeToLicense yes
    Linux./install -mode silent -agreeToLicense yes
    macOS ./install -mode silent -agreeToLicense yes

    Note

    If you do not include the -agreeToLicense yes the installer will not install the MATLAB Runtime.

  3. View a log of the installation.

    On Windows systems, the MATLAB Runtime installer creates a log file, named mathworks_username.log, where username is your Windows log-in name, in the location defined by your TEMP environment variable.

    On Linux and macOS systems, the MATLAB Runtime installer displays the log information at the command prompt, unless you redirect it to a file.

Customizing a Non-Interactive Installation

When run in one of the non-interactive modes, the installer will use the default values unless told to do otherwise. Like the MATLAB installer, the MATLAB Runtime installer accepts a number of command line options that modify the default installation properties.

OptionDescription
-destinationFolderSpecifies where the MATLAB Runtime will be installed.
-outputFileSpecifies where the installation log file is written.
-automatedModeTimeoutSpecifies how long, in milliseconds, that the dialog boxes are displayed when run in automatic mode.
-inputFileSpecifies an installer control file with the values for all of the above options.

Note

The MATLAB Runtime installer archive includes an example installer control file called installer_input.txt. This file contains all of the options available for a full MATLAB installation. Only the options listed in this section are valid for the MATLAB Runtime installer.

Install the MATLAB Runtime without Administrator Rights

To install the MATLAB Runtime as a user without administrator rights on Windows:

  1. Use the MATLAB Runtime installer to install it on a Windows machine where you have administrator rights.

  2. Copy the folder where the MATLAB Runtime was installed to the machine without administrator rights. You can compress the folder into zip file and distribute to multiple users.

  3. On the machine without administrator rights, add the mcr_root\runtime\arch directory onto the user’s path environment variable.

    Note

    You don’t need administrator rights for adding directories to a user’s path environment variable.

Multiple MATLAB Runtime Versions on Single Machine

MCRInstaller supports the installation of multiple versions of the MATLAB Runtime on a target machine. This allows applications compiled with different versions of the MATLAB Runtime to execute side by side on the same machine.

If you do not want multiple MATLAB Runtime versions on the target machine, you can remove the unwanted ones. On Windows, run Add or Remove Programs from the Control Panel to remove any of the previous versions. On UNIX®, you manually delete the unwanted MATLAB Runtime. You can remove unwanted versions before or after installation of a more recent version of the MATLAB Runtime, as versions can be installed or removed in any order.

MATLAB and MATLAB Runtime on Same Machine

You do not need to install MATLAB Runtime on your machine if your machine has MATLAB installed. The version of MATLAB should be the same as the version of MATLAB that was used to create the compiled MATLAB code. Also, to act as the MATLAB Runtime replacement, the MATLAB installation must include MATLAB Compiler™.

You can, however, install the MATLAB Runtime for debugging purposes.

Modifying the Path

If you install MATLAB Runtime on a machine that already has MATLAB on it, you must adjust the library path according to your needs.

  • Windows

    To run deployed MATLAB code against MATLAB Runtime install, mcr_root\ver\runtime\win64 must appear on your system path before matlabroot\runtime\win64.

    If mcr_root\ver\runtime\arch appears first on the compiled application path, the application uses the files in the MATLAB Runtime install area.

    If matlabroot\runtime\arch appears first on the compiled application path, the application uses the files in the MATLAB installation area.

  • UNIX

    To run deployed MATLAB code against MATLAB Runtime on Linux, Linux x86-64, or the <mcr_root>/runtime/<arch> folder must appear on your LD_LIBRARY_PATH before matlabroot/runtime/<arch>.

  • macOS

    To run deployed MATLAB code on macOS, the <mcr_root>/runtime folder must appear on your DYLD_LIBRARY_PATH before matlabroot/runtime/<arch>.

    To run MATLAB on macOS or Intel® Mac, matlabroot/runtime/<arch> must appear on your DYLD_LIBRARY_PATH before the <mcr_root>/bin folder.

Uninstall MATLAB Runtime

The method you use to uninstall MATLAB Runtime from your computer varies depending on the type of computer.

Windows

  1. Start the uninstaller.

    From the Windows Start menu, search for the Add or Remove Programs control panel, and double-click MATLAB Runtime in the list.

    You can also start the MATLAB Runtime uninstaller from the mcr_root\uninstall\bin\arch folder, where mcr_root is your MATLAB Runtime installation folder and arch is an architecture-specific folder, such as win64.

  2. Select the MATLAB Runtime from the list of products in the Uninstall Products dialog box.

  3. Click Next.

  4. Click Finish.

Linux

  1. Exit the application.

  2. Enter this command at the Linux prompt:

    rm -rf mcr_root

    where mcr_root represents the name of your top-level MATLAB installation folder.

macOS

  1. Exit the application.

  2. Navigate to your MATLAB Runtime installation folder. For example, the installation folder might be named MATLAB_Compiler_Runtime.app in your Applications folder.

  3. Drag your MATLAB Runtime installation folder to the trash, and then select Empty Trash from the Finder menu.

Was this topic helpful?