Ubuntu: the sudo ./install does not work for Matlab

158 views (last 30 days)
DitmarH
DitmarH on 29 Sep 2021
Answered: Jason Brooks on 6 Jan 2022 at 13:49
So i have treid both ways. Using the sudo ./install and going to the root with sudo su. Both dont open the installer for Matlab.
If i just type ./install its runs. But the problem is i cant install it in the usr/bin directory. If i install it in the ~/user/ directory it does not open.
Any ideas :/
  3 Comments
Filipe Santos
Filipe Santos on 21 Dec 2021 at 18:55
What I did was the following, I open the folder on terminal and then use
1 - sudo su
2 - ./install
Btw I am on manjaro not on ubuntu, but probably will work.

Sign in to comment.

Accepted Answer

Zdenek Hurak
Zdenek Hurak on 30 Sep 2021
Edited: Zdenek Hurak on 30 Sep 2021
I (partly) confirm the same problems to install R2021b as a root. On Linux (latest Kubuntu 21.04). Exactly following the same installation procedure used successfully dozens of times with previous versions.
After unzipping (unzip matlab_R2021b_glnxa64.zip), typing sudo ./install in a terminal does nothing (prints nothing but the process hangs and needs to be killed after a few minutes of waiting).
Typing just ./install and choosing some user directory gets the installation running and the installed Matlab can be launched without problems.
  3 Comments
Juan Luis Cano Rodríguez
This answer, although marked as "accepted", is hardly a "solution".

Sign in to comment.

More Answers (1)

Jason Brooks
Jason Brooks on 6 Jan 2022 at 13:49
You have to transfer your Xauthority session and display to a different user (root) then run ./install or sudo ./install.
For example on a Linux system:
xauth list $DISPLAY
should return something like:
host.domain.com/unix:10 MIT-MAGIC-COOKIE-1 dacbl57583ec54a1d7115a172143926aa
then run the command:
echo $DSIPLAY
which should return something like:
localhost:10.0
then type:
sudo su (sudo su -, or sudo -i, or whatever your preference)
xauth add host.domain.com/unix:10 MIT-MAGIC-COOKIE-1 dacbl57583ec54a1d7115a172143926aa (whatever was returned from the above xauth list $DISPLAY command)
export DISPLAY=localhost:10.0
Then when you run .install as root it will install wherever you want it to install with root permissions.

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!