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

조회 수: 102 (최근 30일)
DitmarH
DitmarH 2021년 9월 29일
댓글: Nicholas Aksamit 2023년 6월 5일
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
DitmarH
DitmarH 2021년 9월 30일
Yep that was the prolbem. Probably the R2021b is not ready. I just installed the R2020b and everything is fine. Thanks for the help :)
Filipe Santos
Filipe Santos 2021년 12월 21일
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.

댓글을 달려면 로그인하십시오.

채택된 답변

Zdenek Hurak
Zdenek Hurak 2021년 9월 30일
편집: Zdenek Hurak 2021년 9월 30일
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
Wayde Martens
Wayde Martens 2021년 11월 26일
편집: Wayde Martens 2021년 11월 26일
Is there a solution to this yet?
Juan Luis Cano Rodríguez
Juan Luis Cano Rodríguez 2021년 12월 5일
This answer, although marked as "accepted", is hardly a "solution".

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Wei Wang
Wei Wang 2022년 7월 11일
  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 2022년 1월 6일
편집: Jason Brooks 2022년 1월 25일
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.
  댓글 수: 2
Niccolò Marcucci
Niccolò Marcucci 2022년 1월 25일
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.
Jason Brooks
Jason Brooks 2022년 1월 25일
Thanks. I was both in a hurry and assumed too much. I think I've fixed it up.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Introduction 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