geting matlab installer to start on linux

i am trying to install matlab on my new ubuntu 20.04 pc, but i cant even get the installer to show up
i am following the instructions from here, but when i enter the 'sudo ./install' command on the terminal nothing seems to be happening (whereas i ender the './install' command, without sudo, the window shows up instantly). the terminal just seems to get busy but doesn't produce any results
i also tried to change the access permisions on the directory where the installer is with chmod but that doesn't seem to change anything
do i just have to wait for it to load? shouldn't it open in less than a minute? thanks.

1 件のコメント

Rik
Rik 2021 年 11 月 26 日
There seems to be a bug in the installer for Linux. You can run it without sudo, but you will have to chown the installation directory to the current user (and back to root).

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

 採用された回答

Chris
Chris 2021 年 11 月 26 日

2 投票

From a comment deep in the thread (here), and from reading your symptoms, what typically works with this version of Ubuntu is:
xhost +SI:localuser:root
sudo ./install

5 件のコメント

Vasilios Kormas
Vasilios Kormas 2021 年 11 月 26 日
this worked!! thank you very much.
Vasilios Kormas
Vasilios Kormas 2021 年 11 月 26 日
uh oh. installation finished, but i cant find where matlab is?! there is no icon on the applications list, i can see the installed files on /usr/local/MATLAB but i cant open the actual program!
Chris
Chris 2021 年 11 月 26 日
Okay, you need a symbolic link to the binary. Replace RXXXXx with your matlab version (if you start typing and hit [TAB], you can take advantage of name autocompletion in bash)
cd /usr/local/bin
ln -s /usr/local/MATLAB/RXXXXx/bin/matlab matlab
That should allow you to start it from a terminal.
Making a desktop launcher for Gnome is slightly more involved:
Then, you'll probably want to start Matlab in the same folder each time. The easiest way I've found to do this is to put a startup.m file in the Matlab userpath. Type cd(userpath) in the command window, then save startup.m there, containing the same line: cd(userpath)
Chris
Chris 2021 年 11 月 26 日
Having Matlab in /usr/local comes with additional issues--namely, Matlab can't modify itself (e.g., installing Add-ons) without permissions changes. Should you need additional Add-ons, the safest method I'm aware of would be to re-run the installer.
Vasilios Kormas
Vasilios Kormas 2021 年 11 月 27 日
alright, after reading the thread you linked and messing around a bit i finally managed to figure it out. thanks again for your help!!
(if anyone needs to know, i made the file ~/.local/share/applications/matlab_r2021b.desktop with the following contents:
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=R2021b
Type=Application
Terminal=false
Exec=/usr/local/MATLAB/R2021b/bin/matlab -desktop
Name=matlab
Comment=R2021b
Icon=/usr/local/MATLAB/R2021b/bin/glnxa64/cef_resources/matlab_icon.png
and then made it executable with chmod +x ~/.local/share/applications/matlab_r2021b.desktop
then i searched for 'matlab' in my apps and it showed up)

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

その他の回答 (0 件)

カテゴリ

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

製品

リリース

R2021b

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by