How to install Matlab without GUI

If you want to install Matlab in a server, probably you don't have a GUI.

To run the installer you need previosly configurate silent mode:

./install -mode silent
Preparing installation files ...
Installing ...
(Nov 03, 2016 10:53:02) ##################################################################
(Nov 03, 2016 10:53:02)
(Nov 03, 2016 10:53:03) When running the installer with an input file, you must accept the license agreement by setting the agreeToLicense option to yes.
(Nov 03, 2016 10:53:03) Exiting with status -2
(Nov 03, 2016 10:53:07) End - Unsuccessful.

The previous error is because we need configurate all options, like if you are agree with the license agreement, enter the licence key, etc.
To do this, you need to edit installer_input.txt and activate.ini files:

In activate.ini these are the lines that you need configurate:

isSilent=true
activateCommand=activateOffline
licenseFile=/root/Matlab_R2016a_glnxa64.lic

In installer_input.txt these are:

agreeToLicense=yes
fileInstallationKey=09806-07443-53955-64350-21751-41XXX
destinationFolder=/usr/local/R2016a

Now, execute the installer with installer_input options:

./install -inputFile ~/installer_input.txt

At the end of the instalation you will see the following message:

MATLAB Compiler SDK 6.2 requires the following: 

?  a supported compiler for creation of C and C++ Shared libraries
?  a Java JDK for creation of Java packages

(Nov 03, 2016 11:15:54) Exiting with status 0
(Nov 03, 2016 11:15:56) End - Successful.
Finished

To avoid problems, is better install them:

apt-get install gcc build-essential openjdk-7-jdk

Now, to activate matlab, if you run activate_matlab.sh you will see the following error:

./activate_matlab.sh 
---------------------------------------------------------------------------
Error: Activation cannot proceed. You may either:
1. Set an X11 display, and restart the activation process
2. Use the silent activation feature

3. Activate using the license center

To solve it, you must use activation.ini file as parameter:

./activate_matlab.sh -propertiesFile ~/activate.ini 
Silent activation succeeded.

To run matlab, now you need run it wihout interface:

matlab -nodesktop -nojvm -nosplash
#or matlab -nodisplay

If you want run matlab easily, you can add to your ~/.bashrc file the following lines:

alias matlab='matlab -nodisplay'
MATLAB='/usr/local/R2016a/bin'
PATH=$MATLAB:$PATH

If you need remove matlab form your computer, just run these:

rm -rf /usr/local/R2016
rm ~/.matlab
rm /usr/local/bin/matlab /usr/local/bin/mcc /usr/local/bin/mex /usr/local/bin/mbuild

After that, check for any matlab files with:

updatedb
locate matlab

Enjoy it!

Comments

  1. Excellent and very cool idea and the subject at the top of magnificence and I am happy to this post..Interesting post! Thanks for writing it.What's wrong with this kind of post exactly? It follows your previous guideline for post length as well as clarity
    Matlab Training in Chennai

    ReplyDelete
  2. Didn't work for me. On activation it says "Silent activation succeeded.", but when I execute "matlab -nodesktop -nojvm -nosplash" it returns:

    Error: Activation cannot proceed. You may either:
    1. Set an X11 display, and restart the activation process
    2. Use the silent activation feature
    3. Activate using the license center

    ReplyDelete
  3. Much thanks ! This post helped me lots.
    Btw, I was trying to install matlab in a docker container.

    ReplyDelete
  4. Great post! I am actually getting ready to across this information, It’s very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
    Devops training in tambaram|Devops training in velachery|Devops training in annanagar|Devops training in sholinganallur

    ReplyDelete
  5. I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
    java training in chennai | java training in bangalore

    java interview questions and answers | core java interview questions and answers

    ReplyDelete
  6. Whoa! I’m enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between superb usability and visual appeal. I must say you’ve done a very good job with this.

    AWS Training in Toronto | Amazon Web Services Training in Toronto , Canada

    AWS Training in New york city | Amazon Web Services in New York City


    AWS Training in London | Amazon Web Services Training in London , UK

    ReplyDelete
  7. I really like the dear information you offer in your articles. I’m able to bookmark your site and show the kids check out up here generally. Im fairly positive theyre likely to be informed a great deal of new stuff here than anyone

    angularjs Training in marathahalli

    angularjs interview questions and answers

    angularjs Training in bangalore

    angularjs Training in bangalore

    angularjs Training in chennai

    ReplyDelete
  8. I found your blog while searching for the updates, I am happy to be here. Very useful content and also easily understandable providing.. Believe me I did wrote an post about tutorials for beginners with reference of your blog. 
    advanced excel training in bangalore

    ReplyDelete

Post a Comment

Popular posts from this blog

How to fix Android when developer options are not available for this user

from: can't read /var/mail/ in Python scripts

Fix "Set scan parameters failed: Input/output error" on Ubuntu 16.04