Matlab is installed in ubuntu but i am unable to open it

조회 수: 148 (최근 30일)
Saifullah Khan Khalil
Saifullah Khan Khalil 2020년 7월 2일
댓글: Bjorn Gustavsson 2020년 7월 3일
After complete installation of MATLAB, i am not able to open it by applying following command in terminal.
./matlab
Operating system: UBUNTU 18.04
Following is the photo of directory where i installed MATLAB.

답변 (2개)

Bjorn Gustavsson
Bjorn Gustavsson 2020년 7월 2일
If you try to execute something like ./matlab from your terminal you tell the shell to run an executable command "matlab" in the current directory. That would work if you were in the bin-subdirectory of your matlab-installation directory, or in a directory where you had a link matlab pointing to that executable.
Further, it seems that you've installed matlab with ~you/Documents as the installation-directory. That's not pretty. Matlab is not a document. On my machine I have all matlab-releases in a directory /usr/local/MATLAB/, and when I install matlab I do it as super-user so that it get properly installed with executables (links to /usr/local/MATLAB/R2020a/bin/matlab etc) in /usr/local/bin. That way I will have matlab on the shell-path so that I can start it from the shell like: matlab -nodesktop (my prefered way).
I suggest that you re-install matlab as super-user and select to create links in /usr/local/bin (that is the default suggestion IIRC). If you cannot do that and have no user with sys-admin privileges at hand I think you should still move the full installation from your Documents directory, and create a link to the matlab-executable in the bin-directory from a directory on the path you have in your shell (perhaps ~/bin).
HTH
  댓글 수: 7
Saifullah Khan Khalil
Saifullah Khan Khalil 2020년 7월 3일
편집: Saifullah Khan Khalil 2020년 7월 3일
Issue seems to be resolved by taking ownership of the .matlab folder in the home folder with the following command "<username> your username"
sudo chown <username> -R ~/.matlab
but savepath ends with warning.
Bjorn Gustavsson
Bjorn Gustavsson 2020년 7월 3일
That seems to be a problem due to your call to matlab trying to save the path in the matlab installation/local directory - that is overwrite the pathdef of your matlab-installation, possibly with the path as you have after starting matlab (when you "typically" might have added additional directories of yours where you have your matlab-functions and toolboxes.). That's something that I've made sure to never do. My path-setups I put in my startup.m file (more modern use would be to have a your pathsetup.m in your .matlab-directory.). My suggestion would be to disable write-permissions in the matlab-installation-directories (just to avoid mistakes of overwriting important matlab-files, that will not be fun and will happen just before "the important deadline".)
Also: make sure not to put the directories of your own in the toolboxes subdirectory. That will mess up matlabs path/cashing/JIT-handling. Put those in some directory ~username/matlab directory, and make sure that they are added to the path on startup.

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


Image Analyst
Image Analyst 2020년 7월 2일
Try clicking the "Error -9" tag on the right hand side of this page.
Or else call the Mathworks for fast and free technical support.

카테고리

Help CenterFile 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!

Translated by