Installing Matlab R2020a on Fedora 32

In which I need to slightly circumvent the normal installation…

For work purposes I’m currently dual booting into Linux. I will be making a post about the reasons why at some point soon. For this I opted to use the latest version of Fedora,

Fedora 32 is excellent but I have found some occasional issues where software I need to install doesn’t quite work out of the box. Mostly because software releases are a bit behind on the latest libraries. MATLAB was one such program so here’s how to get it working. Links to the posts that helped me work this out at the bottom of the page.

The Issue

MATLAB provides a Linux installer package but when trying to run the install script I got the following error:

$ terminate called after throwing an instance of 'std::runtime_error'
$  what():  Unable to launch the MATLABWindow application
$ Aborted

The Fix

  1. Under Fedora the installer won't launch in the standard GNOME enivronment so you will need to install XFCE4 and some requirements:
    $ sudo dnf install libxcrypt-compat libnsl
    $ sudo dnf groupinstall -y "Xfce Desktop"
  2. Restart your computer and then ensure you log in to an XFCE session at the login prompt.
  3. If you haven’t logged in to your Mathworks account and downloaded the Linux installer package do so here: https://mathworks.com/downloads/web_downloads/download_release?release=R2020a
  4. Unzip the package.
  5. Delete the old crypto library provided in the MATLAB installer:
    $ cd /home/YourUserName/Downloads/matlab_R2020a_glnxa64/bin/glnxa64
    $ rm libcrypto.so.1.1
  6. Then run the installer as normal:
    $ sudo ./install
  7. Continue with the installation as normal:

    1. Enter your Mathworks account details.

    2. Leave the destination folder as /usr/local/MATLAB/R2020a.

    3. Select the products you want.

    4. Wait for the installer to download all the files anf install them. This is quite a big download (mine was around 14 Gb). On a decent fibre connection though the whol process should take less than 10 minutes.

    5. Close the installer.

  8. To run the program just run:
    $ /usr/local/MATLAB/R2020a/bin/matlab

And there you have it. There are some screenshots bleow.

Tom Out!

References

[1] Fedora 30 Matlab Not Installing available at https://mathworks.com/matlabcentral/answers/487256-fedora-30-matlab-not-installing [Accesed 23 June 2020]

[2] Error while installing MATLAB R2020a on Fedora 32 available at https://mathworks.com/matlabcentral/answers/514366-error-while-installing-matlab-r2020a-on-fedora-32 [Accessed 23 June 2020]