snopt / snopt-matlab

Matlab interface for sparse nonlinear optimizer SNOPT
MIT License
55 stars 23 forks source link

'Invalid MEX-file' error #12

Closed ytiang closed 5 years ago

ytiang commented 5 years ago

I'm using precompiled Matlab Libraries, an error occurred when I ran test example:

Invalid MEX-file '/home/yangt/workspace/matlabProjects/snopt-matlab-2.5.0/matlab/snoptmex.mexa64':
libgfortran.so.4: cannot open shared object file: No such file or directory.
Error in snscreen (line 18)
  snoptmex( screenon );
Error in runNPexamples (line 6)
snscreen on 

My system is Ubuntu 16.04 and MATLAB version is 2016a. Could you give me some advise how to solve this problem? Thanks for your reading.

gnowzil commented 5 years ago

You're missing the gfortran library. Install gfortran (sudo apt-get install gfortran) and it should solve the problem.

ytiang commented 5 years ago

thanks for your hint, problem has been solved!