Jump to content

Installing MATLAB

From RHLUG Wiki
Revision as of 17:00, 14 October 2025 by 192.168.122.1 (talk) (auth)

Install MATLAB:

Install with MATLAB package manager

Replace `/usr/local/MATLAB/` with whatever you want, it may make more sense to have it in your home directory.

It needs to run with permission to edit files for authorization, if it is not owned by you run:

chmod -R 777 /usr/local/MATLAB/

Install your preferred release

you can make a new folder for each and have multiple or just use a single folder and overwrite your previous install

mpm install --release=R2025b --destination=/usr/local/MATLAB/R2025b MATLAB Simulink Control_System_Toolbox

Authenticate

Include the lib after ':' if you needed an older version of a library like gnutls, you may also have to run this with bash as it specifies /bin/sh while using bashisms.

LD_LIBRARY_PATH='/usr/lib/dri/:/usr/local/MATLAB/R2025b/lib/' /usr/local/MATLAB/R2025b/bin/glnxa64/MathWorksProductAuthorizer.sh

General install tips

gnutls breaking changes

If you are running a bleeding edge distro you will have to downgrade gnutls to 3.8.9, can be found here for arch: https://archive.archlinux.org/packages/g/gnutls/gnutls-3.8.9-1-x86_64.pkg.tar.zst

Simply unzip all the *.so.[number] files into some sort of library directory specifically for MATLAB to preload it when launching MATLAB, something like `/usr/local/MATLAB/R2025b/lib` will do. Then in your .desktop file prepend

LD_LIBRARY_PATH=/usr/lib/dri/:/usr/local/MATLAB/R2025b/lib/

.desktop file tips

Copy the desktop file to your personal desktop file area to customize how it launches

sudo cp /usr/share/applications/matlab.desktop ~/.local/share/applications/matlab.desktop && sudo chown [user] [user] ~/.local/share/applications/matlab.desktop

change the exec line to keep existing preloads, directly call the the file, and have the startup folder preference be respected:

Exec=env 'LD_PRELOAD=/usr/lib/libfreetype.so:/usr/lib/libstdc++.so:/usr/lib/libfontconfig.so' LD_LIBRARY_PATH=/usr/lib/dri/ /usr/local/MATLAB/R2025b/bin/matlab -desktop -useStartupFolderPref

UI size

In some 2025 release the ui zoom was disabled, you can set it in the MATLAB command window with:

settings().matlab.desktop.Zoom.PersonalValue=150

if you want to tab through the possible settings you can change run:

s=settings
s.[ctrl+space/tab]