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 件のコメント
Stephen Sangwine
2021 年 9 月 29 日
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
2021 年 9 月 30 日
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.
採用された回答
その他の回答 (2 件)
Wei Wang
2022 年 7 月 11 日
11 投票
- (run the command : xhost +SI:localuser:root)
- 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
1 件のコメント
Nicholas Aksamit
2023 年 6 月 5 日
worked for me!
Jason Brooks
2022 年 1 月 6 日
編集済み: Jason Brooks
2022 年 1 月 25 日
6 投票
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 件のコメント
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
2022 年 1 月 25 日
Thanks. I was both in a hurry and assumed too much. I think I've fixed it up.
Wei Sun
2024 年 12 月 12 日
Very useful! It works on ubuntu.Thanks
カテゴリ
ヘルプ センター および File Exchange で Introduction to Installation and Licensing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!