MATLAB: MATLAB hanging or throwing errors on Fedora 28 and Fedora 29

fedorahanglibfreetypelibgliblibnsllibxscrnsaverlibxssMATLAB

I am working in MATLAB R2018a and MATLAB R2018b on the recent Fedora OS releases 28 and 29. There are a variety of issues that I see as MATLAB starts.
1. When I start MATLAB R2018a and R2018b, they hang. The splash screen appears but never disappears and the MATLAB desktop never appears.
Note that MATLAB does work with the "-nodesktop" startup flag. If I try to toggle on the desktop, MATLAB also hangs.
2. MATLAB crashes with a stack trace that looks like:
Stack Trace (from fault):
[ 0] 0x00000000000010c0 [unknown function] at [unknown module] (no module specified)
3. Applications such as the Live Editor, Simulink, App Designer, and the documentation do not open or throw errors.

Best Answer

There is a known issue when running MATLAB R2018a and R2018b on Fedora 28 or 29. Please note that these are not officially supported Operating Systems for those MATLAB releases.
To start, you will need to install the "libnsl" library. MATLAB looks for a version which is no longer shipped with Fedora 28, so needs to be installed manually. You can do this with the following command from a terminal prompt:
sudo yum install libnsl
If you are using MATLAB R2018a, please ensure that you have set aside the "libfreetype.so*" and "libglib-2.so*" libraries. To do this, execute the following in the Linux terminal:
# cd /usr/local/MATLAB/R2018a (or wherever you may have installed MATLAB)
# cd bin/glnxa64
# mkdir exclude
# mv libfreetype* exclude/
and
# cd /usr/local/MATLAB/R2018a (or wherever you may have installed MATLAB)
# cd cefclient/sys/os/glnxa64
# mkdir exclude
# mv libglib-2.0.so* exclude/
Finally, you may need to install the "libXscrnSaver" package if you are seeing an error such as:
error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory
You can do this with the following command from a terminal prompt:
sudo yum install libXScrnSaver
Please start MATLAB normally. If you see any warnings on MATLAB command prompt, then please follow below link to troubleshoot:
For further assistance, please contact MathWorks Technical Support at