採用された回答

johannes neyer
johannes neyer 2022 年 11 月 20 日
編集済み: johannes neyer 2023 年 8 月 26 日

6 投票

I just lost a few hours getting this to work. More detailed information can be found in this Arch Linux wiki entry.
Replace $MATLAB_DIR with the path you installed Matlab to (e.g.: /home/username/matlab). I had to navigate the installer with the keyboard as text input boxes stopped working as soon as I clicked on something with the mouse.
cd ~/Downloads/matlab_R2022b_glnxa64
export LD_PRELOAD=/usr/lib64/libfreetype.so.6
./install
Set scaling for high DPI screens:
TMP=$HOME/tmp $MATLAB_DIR/bin/matlab -r "s = settings;s.matlab.desktop.DisplayScaleFactor.PersonalValue=2;quit" -nodesktop -nosplash
Fix opengl errors:
echo "-Djogl.disable.openglarbcontext=1" >> $MATLAB_DIR/bin/glnxa64/java.opts
Add shortcut:
> cat ~/.local/share/applications/matlab.desktop
[Desktop Entry]
Type=Application
Terminal=false
MimeType=text/x-matlab
Exec=env LD_PRELOAD="/usr/lib64/libstdc++.so.6 /usr/lib64/libfreetype.so.6" LD_LIBRARY_PATH=/usr/lib/dri/ $MATLAB_DIR/bin/matlab -desktop
Name=Matlab
Icon=$MATLAB_DIR/bin/glnxa64/cef_resources/matlab_icon.png
Categories=Development;Math;Science
Comment=Scientific computing environment
StartupNotify=true

4 件のコメント

Vinzenz Brian Gerhard
Vinzenz Brian Gerhard 2023 年 5 月 4 日
export LD_PRELOAD=/usr/lib/libfreetype.so.6
This gave me the error below, however, even with it the other steps worked for me on Fedora 38. Thanks.
ERROR: ld.so: object '/usr/lib/libfreetype.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
Viktor Erdelyi
Viktor Erdelyi 2023 年 5 月 10 日
I suspect it is a typo and he meant the 64-bit version (same as in the shortcut):
/usr/lib64/libfreetype.so.6
johannes neyer
johannes neyer 2023 年 5 月 10 日
編集済み: johannes neyer 2023 年 5 月 10 日
Yes, probably. Can't test this anymore.
Thomas Kock
Thomas Kock 2024 年 2 月 29 日
編集済み: Thomas Kock 2024 年 2 月 29 日
Still works under Fedora 39 and R2023b. Thanks for sharing!

サインインしてコメントする。

その他の回答 (1 件)

Joshua Rhodes
Joshua Rhodes 2023 年 8 月 25 日

0 投票

You could also try using distrobox and podman to create an ubuntu container and running Matlab in that. (Ubuntu is one of the guaranteed supported distros.)

カテゴリ

ヘルプ センター および File ExchangeIntroduction to Installation and Licensing についてさらに検索

タグ

質問済み:

2022 年 11 月 20 日

編集済み:

2024 年 2 月 29 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by