Informatique / Matlab / Ubuntu 16.04 LTS : installation of Matlab R2015a to R2018a without
GUI
We need a valid license for the version we want to install and
- the iso file R2018a_glnxa64_dvd1.iso for release 2018a, R2017b_glnxa64_dvd1.iso for release
2017b, ...
- the file Installation Key
- the license file license.dat (client version)
We choose to present the installation of the release 2018a. For the other releases, the same principle can be
applied. For a console/text mode installation of the release 2018a :
- Create the configuration file Matlab_client.cnf adapted to your license. For me its contents is :
destinationFolder=/usr/local/MATLAB/R2018a
fileInstallationKey=<write your installation key here>
agreeToLicense=yes
mode=silent
licensePath=<write path here>/license.dat
lmgrFiles=false
lmgrService=false
# After add your license products
product.MATLAB
product.MATLAB_Compiler_SDK
product.MATLAB_Compiler
product.Parallel_Computing_Toolbox
A list of some Matlab products/Toolboxes is given product.list .
- to mount the iso file R2018a_glnxa64_dvd1.iso replace in the following command the <path> by the
path of the iso file.
sudo mkdir -p /mnt/isosudo mount -o loop -t iso9660 <path>/R2016b_glnxa64_dvd1.iso /mnt/iso
- The next command lauch Matlab install by using previously created Matlab_client.cnf
file.
sudo /mnt/iso/install -mode silent -inputFile /<full path>/Matlab_client.cnf
- unmount the iso file
For other releases of Matlab, we just have to change the destinationFolder in file Matlab_client.cnf
and use the corresponding iso file.
Possible problems encountered when running/using Matlab (depend of release) :
- Trouble with Java Runtime Environment
---------------------------------------------------------------------------
Warning: Cannot locate Java Runtime Environment (JRE) . . .
1. Either a correct JRE was not available for redistribution when
this release was shipped, in which case you should refer to the
Release Notes for additional information about how to get it.
2. Or you have tried to use the MATLAB_JAVA environment variable
to specify an alternate JRE, but MATLAB cannot find it. Please
run ’matlab -n’ to determine what value you are using for
MATLAB_JAVA and fix accordingly.
---------------------------------------------------------------------------
Warning: Unable to find Java library: /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so
Please check if you have a MATLAB_JAVA environment variable.
Note that MATLAB requires Java version 1.4 or higher.
Warning: Disabling Java support
we install the openjdk-8-jdk package
sudo apt install openjdk-8-jdk
export MATLAB_JAVA=/usr/lib/jvm/java-8-openjdk-amd64/jre
There is always a warning message when running Matlab :
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
- Trouble with libstdc++.so.6
/usr/local/MATLAB/R2016b/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version ‘GLIBCXX_3.4.21’ not found (required by /usr/lib/x86_64-linux-gnu/libproxy.so.1)
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgiolibproxy.so
we must preload the correct library :
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/local/MATLAB/R2016b/bin/matlab