Skip to content

Installing Matlab

Info

This article assumes that you have a license for MATLAB.

Installing matlab through the AUR requires adding a license.lic, matlab.fik and a matlab.tar to the directory containing the PKGBUILD file, before using makepkg to build the package.

1. Obtain license.lic and matlab.fik.

  1. Go to the License Center.
  2. Under My Software, click the license number you want to activate. If you do not see your license number, in the bottom right hand corner, click View Additional Licenses or Trials.
  3. Click the Install and Activate tab
  4. Click Activate to Retrieve License File or Activate a Computer.
  5. Enter the following information: the release you are activating, the operating system, the host ID, your user or login name, and the Activation Label.

    • $ ip addr | grep ether # Your host ID is your MAC Address.
    • $ whoami # This is your username.
  6. Download license.lic and rename it to matlab.lic.

  7. Copy the file installation key into a new file named matlab.fik.

2. Obtain matlab.tar

Tip

You can run ./install to automatically run the commands below and build the package.

  1. Download the matlab installer.
  2. Extract the zip file
    unzip -X -K matlab_*_glnxa64.zip -d MATLABROOT
    
  3. Use freetype2 (explanation)
    $ mv MATLABROOT/bin/glnxa64/libfreetype.so.6 \
        MATLABROOT/bin/glnxa64/libfreetype.so.6.MATLAB
    
  4. Run the installer
    $ ./MATLABROOT/install
    
  5. After having logged in and accepted the license agreement, select Advanced OptionsI want to download without installing from the top-right drop-down menu.
  6. Set the download location to the PKGBUILD directory.
  7. Select Linux as the target platform.
  8. Choose your toolboxes or select only the MATLAB toolbox for a minimal installation. You can install all the other toolboxes later through the add-ons manager.
    • Update the _products array to reflect your choices, using the names at the end of MATLABROOT/installer_input.txt.
  9. Download the files and close the installer.
  10. Rename the downloaded directory to matlab
    $ mv <YYYY_MM_DD_HH_mm_ss> matlab
    
  11. Create the tarball with:
    $ tar -I zstd -cvf matlab.tar matlab
    

3. Install

  1. Make sure that the following files are in the PKGBUILD directory:
    • matlab.fik
    • matlab.lic
    • matlab.tar
  2. Build the package.
    $ makepkg -s
    
  3. Install the package.
    $ sudo pacman -U matlab-*.pkg.tar.zst
    

Further reading