Skip to content

How to Install and Activate MATLAB on a Unix/Linux Machine from Terminal

matlab-2012B-300x300
Subject:

How can I install and activate MATLAB on a Unix/Linux machine without using the X Window System (X Server)?

Problem Description:

The installer seems to require an X Server, but does have an option to install without an X Server. It is possible to install and activate MATLAB without an X Server?

Solution:

# vi my_input_file.txt
mode=silent
agreeToLicense=yes
fileInstallationKey=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
outputFile=/tmp/mathworks_.log
mode=silent
activationPropertiesFile=/root/Matlab2012b/activate.ini
licensePath=/root/Matlab2012a/licenses/license.lic
./install -if my_input_file.txt

OR

./install -mode silent -agreeToLicense yes -fileInstallationKey XXXXX-XXXXX-XXXXX-XXXXX-XXXXX -activationPropertiesFile /root/Matlab2012a/activate.ini -licensePath /root/Matlab2012a/licenses/license.lic

**Problem:**If you are getting this error:

terminate called after throwing an instance of 'std::runtime_error'

Solution:

export LC_ALL="en_US.utf8"

If you have a standalone license file, you will need to manually place the license file. To do so:

  1. Navigate to the directory where you chose to install MATLAB.
  2. If the “licenses” subdirectory does not exist, create this directory
  3. Save your license file as “license.lic” in MATLAB’s licenses subdirectory.

Thats it, MATLAB will be installed and activated.