Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I barely managed to get MATLAB installed but I think it's installed correctly. However, when I cd to the bin directory and run ./matlab, the MATLAB logo comes up but then it instantly closes again and I get the error message:

License checkout failed. License Manager Error -2 

Make sure that the formatting of the license file is correct. When editing the license file use a basic text editor.
Troubleshoot this issue by visiting:

Diagnostic Information: Feature: MATLAB 

License path: /home/x/.matlab/R2012b_licenses:/home/x/MATLAB1/licenses/license.dat:/home/x/MATLAB1/licenses/network.lic 

Licensing error: -2,413. System Error: 2 ~/MATLAB1/bin$ ./matlab Fatal Error on startup: 

Cannot locate com/mathworks/jmi/OpaqueJavaInterface class

I've looked at the solution prescribed on the MathWorks website but I'm having a hard time figuring out what to do. I'm using 64 bit Ubuntu 12.10.


share|improve this question
Does the license look ok when you go to the mentioned path? – Dennis Jaheruddin Feb 4 '13 at 13:14

Based on the error message, you should put the license file into the following folder

License path: /home/x/.matlab/R2012b_licenses:/home/x/MATLAB1/licenses/license.dat:/home/x/MATLAB1/licenses/network.lic

share|improve this answer
Those seem like many folders. Which one should I use? – user1282043 Sep 21 '15 at 22:55
you can put it under /home/x/.matlab/ or /home/x/.matlab/R2012b_licenses The semi colon is just to separate many paths. – tndoan Sep 22 '15 at 2:21

I solved this problem, by actually double checking that I had the right license. It turned out I had a different network.lic, and that's why my previous network.lic didn't work. I opened it up, and copied the same one another computer in the building had, and it worked fine.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.