License Manager Error -9 when run as administrator but not normally
Show older comments
I have Ubuntu 16.04 and have a student version of Matlab and want to install a trial version of the Statistics and Machine Learning Toolbox. But the installer doesn't have permission (Access Denied: Unable to write to /usr/local/MATLAB/R2016b. Please select a different folder).
So I try to run Matlab with root permission using
sudo matlab &
but I get
License checkout failed.
License Manager Error -9
Your username does not match the username in the license file.
To run MATLAB on this computer, you must run the Activation client to reactivate your license.
Troubleshoot this issue by visiting:
http://www.mathworks.com/support/lme/R2016b/9
Diagnostic Information:
Feature: MATLAB
License path: /home/pjhellemn/.matlab/R2016b_licenses:/usr/local/MATLAB/R2016b/licenses/license.dat:/usr/local/MAT
LAB/R2016b/licenses/license_pjhellemn-Lenovo-ideapad-Y700-14ISK_3284817_R2016b.lic
Licensing error: -9,57.
How do I allow Matlab to be run with root permissions, so that I can install the toolbox?
3 Comments
SeyedSaeid Hosseinipoor
on 12 Sep 2017
I have installed student version. It asked me about login name. I added my name and I faced this problem. I reinstalled it with login name and it was gone. Because just one login name was valid for me. Be careful about it.
Walter Roberson
on 12 Sep 2017
If you are using OS-X or Linux, the username you tell MATLAB should be the same as what you get for the result of
whoami
when you run that at your shell prompt.
Maximilian Prilmueller
on 19 Oct 2023
I ended up here because i am currently troubleshooting the gui not starting. This Forum gave me the tip to run matlab as administrator. Now I know that the license check seems to be the only thing about my matlab that is currently working.
Accepted Answer
More Answers (1)
Ryan Patterson
on 15 Dec 2019
Edited: Ryan Patterson
on 15 Dec 2019
I figured it out.
In terminal go to where your activation file is located(This Might Be Different For You!) and run it. Not sure if you need "sudo" for this step.
$ cd /usr/local/MATLAB/R2019b/bin
$ sudo ./activate_matlab.sh
When asked for a name, input "root" and complete the other boxes like normal. Exit matlab. Using "sudo -i" puts it in root mode so you have permission to install it.
$ sudo -i
# cd /usr/local/MATLAB/R2019b/bin
# ./matlab
Now you should be able to install the update. After its installed you should change the activation name back to what it was originally or else you will always have to run it under "root".
# exit
$ sudo ./activate_matlab.sh
10 Comments
Jongan Park
on 19 Feb 2020
Thank you! it works well for me.
Khanh Do
on 17 Apr 2020
Thank you!
Andres Mauricio Molina Barreto
on 13 May 2020
It worked perfectly. Thank you so much!
Julián Eduardo Villamizar Peña
on 27 Jul 2020
Thank you very much! This really solved my issues with the interface. The trick was about to change the username as root. Once you do that, it's just to execute matlab as root always.
khaled walid
on 14 Oct 2020
Finally working, thank you.
Tudor-Bogdan Airimitoaie
on 8 Mar 2021
This solution worked for me also (Ubuntu 20.04.1), thank you.
ElSayed Mostafa
on 3 Sep 2021
Running MATLAB as root solved this problem for me also (Ubuntu 18.04.5). Thanks.
Wladimir Vera
on 30 Mar 2022
Following the written above by Ryan I have solved my problem too!! Ubuntu 20.04.
Thanks a lot
MONRUETHAI SUEKSAKAN
on 19 Dec 2022
it's work.. thanks so much
Yoana Grudeva
on 12 Dec 2023
Thanks! For anybody having issues running the add-on explorer, it's because sometimes graphical apps are not allowed as root. To fix this, in a terminal run
xhost si:localuser:root
sudo matlab
and change back your permissions after you're done with installations by
xhost -si:localuser:root
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!