Why is the Update installer quitting with "Update installer must be run as root"?

조회 수: 2 (최근 30일)
I am trying to install an Update on my Linux computer by running ./R2018a_Update_#_glnxa64.sh. But the Update installer is quitting with the following error, even though I currently am root:
Fatal error: Update installer must be run as 'root'.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2019년 2월 14일
This usually happens when initially logging in as non-root, then switching with "su" to root, which keeps the environment of the initially logged in user.
Either use "su -" to switch to root in order to initialize root's own environment or run the Update installer with sudo, for instance:
$ sudo ./R2018a_Update4_glnxa64.sh
The cause of the issue is a combination of how the installer checks who the current user is and how Linux switches users, specifically their environment variables.
The installer compares the owner of the MATLAB installation (by default /usr/local/MATLAB/R20XXx) and the value of the $USER environment variable. Linux sets the $USER variable when calling "login", but using "su" does not update this variable, on the other hand "su -" does. Running with "sudo" has a similar effect.
For example, if you initially login with "user1", $USER is set to user1. Switching to root with "su" will keep user1's environment variables, even though the current user is now root. Switching with "su -" will update $USER to root.
Refer to the man page for su (man su) for more information about this behavior.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by