You are not logged in.

#1 2018-02-04 10:53:23

Airon90
Member
From: Canegrate
Registered: 2012-12-11
Posts: 60
Website

Cannot install MATLAB with sudo

Hi, I have a little problem. As the wiki says, you can run the script as root to install MATLAB system-wide. However, when I run the script with sudo nothing happens.

[airon@aironpc matlab_R2017b_glnxa64]$ sudo ./install 
Preparing installation files ...
Installing ...
Finished

If I run it without sudo, the installer's window appears. Is it a MATLAB bug or am I  missing some library as I just formatted my laptop?
Thank you very much!

Last edited by Airon90 (2018-02-04 11:11:47)

Offline

#2 2018-02-04 11:19:52

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,863

Re: Cannot install MATLAB with sudo

No, it says "as root" - naive sudo will not allow you to run X11 processes as root and you frankly should not anyway.
Any reason you're not using the AUR package?

Offline

#3 2018-02-04 12:20:35

Airon90
Member
From: Canegrate
Registered: 2012-12-11
Posts: 60
Website

Re: Cannot install MATLAB with sudo

seth wrote:

No, it says "as root" - naive sudo will not allow you to run X11 processes as root and you frankly should not anyway.

Thank you for the answer. I'm pretty sure that I run sudo ./install and it installed MATLAB in /usr/local/bin/ without problem.

seth wrote:

Any reason you're not using the AUR package?

No, I always just run the official installer on my own and it installed MATLAB without any problem. I will give it a try.

Last edited by Airon90 (2018-02-04 12:20:46)

Offline

#4 2018-02-04 14:09:47

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,863

Re: Cannot install MATLAB with sudo

pretty sure that I run sudo ./install and it installed MATLAB in /usr/local/bin/ without problem

In what context (previous version, other distro, ...) and did that include

the installer's window appears

?

The problem with sudo'ing the installer is the GUI part which will cross xauthority protections.
There're ways to subvert that (by either setting the proper environment in the sudo context and/or opening the X11 server w/ xhost - which is no good idea) but eg. just a naive "sudo xterm" will not work.

Offline

Board footer

Powered by FluxBB