JustPaste.it

Linux Matlab (Problem Solving)

1 If you cannot enter values ​​in the "Enter File Installation Key" field, try restarting the installer several times.


If Matlab quietly closes after launch, try running Matlab with elevated privileges (using sudo). If this happens when launching from the launcher/desktop icon/.desktop file, try checking the "Run in terminal" box in the launcher settings .

 

3 If during installation of Matlab a problem like "terminate called after throwing an instance of 'std::runtime_error' what(): Unable to launch the MATLABWindow application" occurs, then try copying the contents of the image to a certain folder, delete the files bin/glnxa64/libcrypto.so.1.1 and bin/glnxa64.libssl.so.1.1 in it and run the installation from this folder, and not from the iso image .

 

If you encounter errors during the installation of Matlab (on Ubuntu, for example), such as "bus error" or "error reading," try mounting the ISO image in the system differently. For example, use Disk Image Mounter instead of Archive
Mounter.

 

5 If Matlab freezes when installed under root

try installing it like this:
cd <iso-mounted-folder>
xhost +SI:localuser:root
./install
xhost -SI:localuser:root

 

If fish-shell is used by default in a Linux session, MATLAB will not work correctly with it, and various errors will occur. To avoid these problems, try setting the variable before starting MATLAB or globally.

Code: export MATLAB_SHELL=/bin/bash

 

7 If you don't like that Matlab is chatting a lot on the Internet without asking, try running it with the command (<matlabfolder> - the folder where you installed Matlab... usually it's something like ~/Matlab/R2022b)

Code: systemd-run --scope -p IPAddressDeny=any -p IPAddressAllow=localhost <matlabfolder>/bin/matlab

 

When running the command, systemd will ask for the superuser password, but the program itself will run as the user. The user must have special privileges, such as being in the wheel group.
If you don't have systemd, you can try running it through a firejail :

Code: firejail --profile=/etc/firejail/matlab.profile env JAVA_TOOL_OPTIONS="-Dglass.gtk.uiScale=1" <matlabfolder>/bin/matlab -desktop

 

File /etc/firejail/matlab.profile:

 

Code:

 

ignore private-opt emp
ignore memory-deny-write-execute
ignore machine-id
ignore noexec /tmp

netfilter
# You can also use a more strict option (but in this case Matlab will complain with unimportant warnings):
# net none

 

whitelist ${HOME}/
# Or, instead, write more precisely (which is even necessary if Matlab is not installed in the home directory):
# whitelist <matlabfolder>

 

If you're unable to use 3D acceleration by default (usually the "opengl info" command returns an error or half-empty data), try explicitly telling Matlab which dri driver to use . View the list by running "ls /usr/lib64/dri/" and selecting <dridriver> , then launch Matlab with a command like

 

Code:
export MESA_LOADER_DRIVER_OVERRIDE=<dridriver>; <matlabfolder>/bin/matlab

If this is not enough, also delete the files <matlabfolder>/sys/os/glnxa64/libstdc++.so.*
If it works in the end, you can write the command "export MESA_LOADER_DRIVER_OVERRIDE=<dridriver>;" directly in "<matlabfolder>/bin/matlab"!


Alternatively, you can try creating a file '<matlabfolder>/bin/glnxa64/java.opts' with the content "-Djogl.disable.openglarbcontext=1"