MATLAB: Will MATLAB not start up properly on the Linux or UNIX based system

MATLAB

MATLAB will not start up on my Linux or UNIX based system, and I am not getting license manager errors.

Best Answer

If you are having trouble starting MATLAB on a UNIX-based system and you are not receiving license manager related errors, your start up problems may be resolved by performing the following steps:
Solution #1: Remove Preferences
Remove your preferences directory, so that it can be recreated cleanly:
1. Open the Terminal Application (usually found in Applications or Utilities).
2. In the terminal window and run the following commands:
cd ~/.matlab
3. Once in the .matlab folder, delete the folder for the version of MATLAB you have. For example, if you have R2015a, run the command:
rm -rf R2015a
NOTE: Do not remove any folder that ends with "_licenses."
4. Once cleared, restart MATLAB. The preferences should be recreated.
On some distributions, launching MATLAB with sudo will create MATLAB preferences in your home folder that are owned by root. You will then not able to launch MATLAB as a standard user as MATLAB will not be able to read it's own preferences. 
Solution #2: Move Working Directory 
If the above solutions do not work, be sure that there are no files conflicting on your MATLAB path. To verify that your work files and/or startup.m files are not conflicting with this MATLAB installation, perform the following steps:
1. Move the contents of your ~/Documents/MATLAB folder to another location on your computer.
2. Start MATLAB again to see if the problem still occurs.
If this resolves the problem, one of your work files is likely conflicting with your MATLAB installation or your startup.m file is crashing MATLAB.
Solution #3: Disable SELinux, AppArmor or other security software:
Try running MATLAB with SELinux disabled. SELinux may prevent MATLAB from starting. To temporarily disable it, run the following command as root:
/usr/sbin/setenforce 0
(/usr/sbin/setenforce 1 will turn SELinux back on)
To disable AppArmor on newer Ubuntu versions, run the below as root:
invoke-rc.d apparmor kill
update-rc.d -f apparmor remove
Once disabled, try MATLAB again. If it works, see the Related Solution at the bottom of the page:
"Why do I receive errors relating to the file "libmwlapack" when starting MATLAB R14SP3 or higher on Linux?"
http://www.mathworks.com/matlabcentral/answers/92230-why-do-i-receive-errors-relating-to-the-file-libmwlapack-when-starting-matlab-7-0-1-r14sp3-or-hi
Note: You may also have to reset the permissions on the folder you are trying to install from. Run the following command to modify the permissions:\n
chmod -R 755 $installfolder
Solution #4: Debugging Mode
Open MATLAB with the Desktop and Java options Disabled:
1. From the terminal, type the following:\n
cd $MATLABROOT/bin/
Where $MATLABROOT is the path to your root MATLAB directory)
By default this will be /usr/local/MATLAB/R2015a/bin for R2015a. 
2. Try launching MATLAB with each of the below commands:
matlab -nodesktop
matlab -nojvm
matlab -nodisplay
If MATLAB starts in either of these modes, there is most likely a Java issue. If MATLAB fails to start in either of these modes, more information may be obtained from the MATLAB crash dump files. These files will be located in your home folder and will have the names:
~/matlab_crash_dump.XXX
~/java.log.XXX
~/hs_err_pid#.log
If any of these files exists, send those files along with the output of the commands above to the Installation and Licensing team using the form at the bottom of this article.
Solution #5: Missing Libraries
MATLAB is tested and fully qualified on Ubuntu, Debian, Red Hat Enterprise Linux (RHEL), and SuSE. However, it will still run on most popular distributions of Linux, provided it is a full desktop installation of the distribution. MATLAB is not supported on minimal or server distributions. A minimal installation may not contain all libraries that MATLAB requires. 
Even if you intend to run MATLAB only in non-graphical mode, MATLAB requires some X11 libraries to run. However, we are not able to specify the X11 requirements down to the exact set of packages required because different distributions may package the libraries differently. MATLAB will work out of the box on desktop installations of any supported distribution. 
See the below for a list of qualified distributions:
https://in.mathworks.com/support/requirements/matlab-system-requirements.html
If you are still unable to launch MATLAB on Linux after trying these troubleshooting steps, please contact the Installation & Licensing Support team:
http://www.mathworks.com/support/contact_us/
Related Question