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

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 comentarios

I have found the same thing with the R2021b installer on Ubuntu 20.04. Running it using sudo ./install does not produce the installer window. Running as a normal user produces the window, but of course it can't create the installation directory because it doesn't have root privilege. I don't recall having this problem with earlier releases.
DitmarH
DitmarH el 30 de Sept. de 2021
Yep that was the prolbem. Probably the R2021b is not ready. I just installed the R2020b and everything is fine. Thanks for the help :)
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.

Iniciar sesión para comentar.

 Respuesta aceptada

Zdenek Hurak
Zdenek Hurak el 30 de Sept. de 2021
Editada: Zdenek Hurak el 30 de Sept. de 2021

0 votos

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 comentarios

DitmarH
DitmarH el 30 de Sept. de 2021
Editada: DitmarH el 30 de Sept. de 2021
It was a problem with the R2021b the sudo ./install comand does not work. The problem was after installing it in another directory (using just the ./install ) matlab would not open. It would start. Show the winodw you get when you lunch it (the poster thingy :P) and then just close. Nothing happened
I just installed one of the previous versions. R2020b. I used sudo ./install and could isntall it in the /usr directory. Now everything works fine and matlab luncehs with no problems. I can now also use the icon on my lunch bar or whatever thats called xD
Thanks for the help. Have a good day mate :)
Wayde Martens
Wayde Martens el 26 de Nov. de 2021
Editada: Wayde Martens el 26 de Nov. de 2021
Is there a solution to this yet?
This answer, although marked as "accepted", is hardly a "solution".

Iniciar sesión para comentar.

Más respuestas (2)

Wei Wang
Wei Wang el 11 de Jul. de 2022

11 votos

  1. (run the command : xhost +SI:localuser:root)
  2. sudo ./install
works for me for Ubuntu 22.04 LTS and Matlab R2022a
As answered here:
https://ww2.mathworks.cn/matlabcentral/answers/1459474-sudo-install-not-opening-installer-matlab-2021b
Jason Brooks
Jason Brooks el 6 de En. de 2022
Editada: Jason Brooks el 25 de En. de 2022

6 votos

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 $DISPLAY
which should return something like:
localhost:10.0
then switch to a root shell:
sudo su (sudo su -, or sudo -i, or whatever your preference to get a root shell)
and based on YOUR results from the above commands:
xauth add host.domain.com/unix:10 MIT-MAGIC-COOKIE-1 dacbl57583ec54a1d7115a172143926aa
(this will be whatever was returned from the above xauth list $DISPLAY command)
export DISPLAY=localhost:10.0 (this will be whatever was returned from echo $DISPLAY)
Then when you run .install as root it will install wherever you want it to install with root permissions.

3 comentarios

This actually solves the problem, thank you! A couple of notes for the posterity:
  • there is a typo in the line " echo $DSIPLAY "
  • when exporting the display, use the result of the previously run command " echo $DISPLAY ", instead of " localhost:10.0 "
  • it should be noted that you shall run the install script from the root shell, because " sudo ./install " will not work.
Thanks. I was both in a hurry and assumed too much. I think I've fixed it up.
Wei Sun
Wei Sun el 12 de Dic. de 2024
Very useful! It works on ubuntu.Thanks

Iniciar sesión para comentar.

Categorías

Más información sobre Introduction to Installation and Licensing en Centro de ayuda y File Exchange.

Productos

Versión

R2021b

Preguntada:

el 29 de Sept. de 2021

Comentada:

el 12 de Dic. de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by