Is there a way to install MATLAB without launching a window as root?
조회 수: 51 (최근 30일)
이전 댓글 표시
Every time I install a new version of Matlab, I wince as I launch the installer as root. Running graphical applications as root is a serious security vulnerability. But if I try to run the installer as my normal user, I get an error when I get to the installation step saying the installer can't write to the selected location (the usual /usr/local/MATLAB directory).
Is there a way to install Matlab without running the graphical installer as root? Is there a non-graphical install method?
댓글 수: 0
답변 (2개)
Rashed Mohammed
2021년 3월 22일
Hi Josh
MATLAB installer needs to be launched as root only if the installer has to write/modify files which only a root user can access such as /usr/local/MATLAB and /usr/local/bin. If you specify a destination folder which a non-root user has access to and do not want MATLAB installer to automatically create symlinks, then launching MATLAB installer as non-root user is sufficient to install MATLAB.
However, if you wish to perform a non-graphical installation, I would suggest you to go through Install Noninteractively documention page. Please note that this process requires you to access File Installation Key from your MathWorks account license page.
Hope this helps
댓글 수: 0
Jaroslav
2024년 8월 19일
Hello,
you can run Matlab's installer in Linux without root privilege as follow (assuming username josh). The idea is to allow user to write to directory /usr/local/MATLAB
$ sudo mkdir /usr/local/MATLAB
$ sudo chown josh /usr/local/MATLAB
To allow the Matlab's installer to create links to executables, you can create local bin directory
$ mkdir /usr/local/MATLAB/bin
Then run MATLAB installer without root
$ cd ~/Downloads/matlab_R2024a_Linux
$ ./install
During the installation, select links to bin files to be written to "/usr/local/MATLAB/bin"
Last, change PATH by adding following line to ~/.bashrc
export PATH=$PATH:/usr/local/MATLAB/bin
This procedure has worked for me (Ubuntu 24, Matlab2024)
Hoping it helps somebody
Jaroslav
댓글 수: 0
참고 항목
카테고리
Help Center 및 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!