Error after ubuntu update: Invalid MEX-file '/usr/lib/dynare/mex/matlab/mjdgges.mexa64': /usr/local/MATLAB/R2021b/bin/glnxa64/../../sys/os/glnxa64/ version `GFORTRAN_10' not found

Hi everyone,

I recently updated my ubuntu to Ubuntu 22.04 LTS and now I obtain the following error when running


even in files, which were previously running smoothly:

Invalid MEX-file '/usr/lib/dynare/mex/matlab/mjdgges.mexa64': /usr/local/MATLAB/R2021b/bin/glnxa64/../../sys/os/glnxa64/
version `GFORTRAN_10' not found 

Commands like steady; or resid still work without throwing an error.
For any recommendation on what to do, I would be very grateful.

Many greetings

Hi everyone,
I could fix it following that solution:

Many greetings,

Hi mazin,

glad that you could solve it :slight_smile:
Could I ask you a question? I am also using Ubuntu and am still on 20.04 and wanted to hold back from updating since Matlab and Dynare are essential for me and not really feel like debugging too much right now haha. Did you have any issues with Matlab and Dynare on 22.04 (except the one you just fixed)?

Thank you!

Dear DoubleBass,

I had no other issues so far.
Slight deviations from the solution I sent were that the path where Matlab was looking was


and the path where the corresponding file is located was


so the exact command I had to execute was

sudo ln -sf /usr/lib/x86_64-linux-gnu/ "/usr/local/MATLAB/R2021b/sys/os/glnxa64/"

At least so far, I did not notice anything else.

Many greetings

1 Like

Great news, thank you :slight_smile:

Typically installing the package matlab-support and choosing to rename the gcc files takes care of such issues and you won’t have to link files around.