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

136 次查看(过去 30 天)
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
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