MATLAB Answers

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

14 views (last 30 days)
Saifullah Khan Khalil
Saifullah Khan Khalil on 2 Jul 2020
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.

  0 Comments

Sign in to comment.

Answers (2)

Bjorn Gustavsson
Bjorn Gustavsson on 2 Jul 2020
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 Comments

Show 4 older comments
Bjorn Gustavsson
Bjorn Gustavsson on 2 Jul 2020
Does the file exist already - with some peculiar permissions? Does the directory exist? Do you have write permissions in that directory. These are typically the things I've messed up when that error-message comes up...
Saifullah Khan Khalil
Saifullah Khan Khalil on 3 Jul 2020
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 on 3 Jul 2020
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.

Sign in to comment.


Image Analyst
Image Analyst on 2 Jul 2020
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.

  0 Comments

Sign in to comment.


Translated by