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.
- Go to the License Center.
- 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.
- Click the Install and Activate tab
- Click Activate to Retrieve License File or Activate a Computer.
-
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.
-
Download
license.licand rename it tomatlab.lic. - 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.
- Download the matlab installer.
- Extract the zip file
unzip -X -K matlab_*_glnxa64.zip -d MATLABROOT - Use
freetype2(explanation)$ mv MATLABROOT/bin/glnxa64/libfreetype.so.6 \ MATLABROOT/bin/glnxa64/libfreetype.so.6.MATLAB - Run the installer
$ ./MATLABROOT/install - After having logged in and accepted the license agreement, select
Advanced Options→I want to download without installingfrom the top-right drop-down menu. - Set the download location to the PKGBUILD directory.
- Select
Linuxas the target platform. - 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
_productsarray to reflect your choices, using the names at the end ofMATLABROOT/installer_input.txt.
- Update the
- Download the files and close the installer.
- Rename the downloaded directory to
matlab$ mv <YYYY_MM_DD_HH_mm_ss> matlab - Create the tarball with:
$ tar -I zstd -cvf matlab.tar matlab
3. Install
- Make sure that the following files are in the PKGBUILD directory:
matlab.fikmatlab.licmatlab.tar
- Build the package.
$ makepkg -s - Install the package.
$ sudo pacman -U matlab-*.pkg.tar.zst