libgfortran.so.4 error with SNOPT in MATLAB on Ubuntu 22.04

215 views
Skip to first unread message

Rebecca Jiang

unread,
Jun 23, 2023, 12:58:08 PM6/23/23
to SNOPT
When trying to run SNOPT in MATLAB on Ubuntu 22.04, I'm getting:
Invalid MEX-file ... : libgfortran.so.4: cannot open shared object file: No such file or directory.

I saw that the SNOPT website says that this happens if the gfortran compiler is not installed. However, I do have gfortran installed, at the newest version (4:11.2.0-1ubuntu1).

Another labmate of mine who tried to run SNOPT in MATLAB on Ubuntu 22.04 the other day said he had the same issue on his machine, and suspects the issue is that the mex files are compiled with an older version of gfortran?

Thanks in advance.

Nicolò Pollini

unread,
Dec 26, 2023, 7:33:46 AM12/26/23
to SNOPT
Same problem for me!
...snopt7/matlab/snoptmex.mexa64':

libgfortran.so.4: cannot open shared object file: No such file or directory

With ubuntu 22.04.

Any ideas?

Reply all
Reply to author
Forward
0 new messages