Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

libgfortran: version `GFORTRAN_1.4' not found

Tags:

matlab

blas

I am getting the following error when I trying to a run mex file in MATLAB:

??? Invalid MEX-file
'findimps3.mexa64':
/MATLAB/bin/glnxa64/../../sys/os/glnxa64/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /usr/lib/libblas.so.3gf)

Any ideas how to solve this problem?

update: I found out that "strings MATLAB/.../libgfortran.so.3 | grep GFORTRAN" output GFORTRAN_1.0. I tried to changed libgfortran inside MATLAB but it didn't work. Not I think it's better to find a suitable libblas that works with GFORTRAN_1.0.

like image 818
Mohammad Moghimi Avatar asked Mar 09 '12 02:03

Mohammad Moghimi


2 Answers

read this link, it explains how to configure matlab on some linux systems.

here the steps that are relevant to you:

To enable running external programs, […] fortran libraries need to be properly updated and linked. Look at the output of this command:

ll "$MATLABDIR/bin/glnxa64/"

It is likely that [this link] exist:

libgfortran.so.3 -> libgfortran.so.3.0.0

Search for [this library] on your machine:

locate libgfortran.so

[…] Update Matlab's links to point to these newer versions:

sudo ln -sf [location of libgfortran.so.3.0.0] "$MATLABDIR/bin/glnxa64/libgfortran.so.3"
like image 121
flying sheep Avatar answered Sep 18 '22 19:09

flying sheep


I (think I) fixed this problem by running matlab with LD_PRELOAD, like this

LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libfreetype.so:/usr/lib/x86_64-linux-gnu/libgfortran.so.3 matlab

Notice freetype was another library I was having a similar problem with.

like image 45
dividebyzero Avatar answered Sep 20 '22 19:09

dividebyzero