Pregunta

Estoy obteniendo el siguiente error cuando intento un archivo MEX de ejecución en 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)

¿Alguna idea de cómo resolver este problema?

Actualización: Descubrí que "cuerdas matlab /.../ libgfortran.so.3 | GREP GFORTRAN" OUTPUT GFORRAN_1.0.Intenté haber cambiado a Libgfortran dentro de Matlab, pero no funcionó.No creo que es mejor encontrar un libblas adecuados que funcione con GFORRAN_1.0.

¿Fue útil?

Solución

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"

Otros consejos

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.

In my case the following command worked:

sudo ln -sf /usr/lib/gcc/i686-linux-gnu/4.7/libgfortran.so /usr/local/MATLAB/R2012a/sys/os/glnx86/libgfortran.so.3

Matlab was complaining it couldn't find the GFORTRAN1.4 in the following location:

/usr/lib/gcc/i686-linux-gnu/4.7/libgfortran.so

So I linked this location to the library I had :

/usr/local/MATLAB/R2012a/sys/os/glnx86/libgfortran.so.3

I found the location of this library by using the locate command as given above:) Thanks for the help:)

In my case, fixed by
$ ln -sf /usr/lib64/libgfortran.so.3.0.0 /opt/matlab/sys/os/glnxa64/libgfortran.so.3

Errors I meet when using CDSP:
csdp: /opt/matlab/sys/os/glnxa64/libgfortran.so.3: version GFORTRAN_1.4' not found (required by /usr/lib64/atlas/libptf77blas.so.3)
csdp: /opt/matlab/sys/os/glnxa64/libgfortran.so.3: version
GFORTRAN_1.4' not found (required by /usr/lib64/atlas/libf77blas.so.3)

I just ran into the same problem (error usr/lib64/libgfortran.so.3: version `gfortran_1.4' not found) and it was actually not hard to fix. The problem seems to be that gfortran_1.4 version of libgfortran.so.3 comes from the release gcc-4.6.2 (i.e. fortran 4.6).

What I did was downloaded gcc-4.6.2 and built, using the steps: tar -xvf gcc-4.6.2.tar.gz cd gcc-4.6.2 ./contrib/download_prerequisites cd .. mkdir objdir cd objdir $PWD/../gcc-4.6.2/configure --prefix=$HOME/gcc-4.6.2 --enable-languages=c,fortran,c++,go make make install

Then, once everything was made, I went to the directory where the new, fresh libgfortran.so.3 was sitting (in my case it was /home/testuser/objdir/x86_64-unknown-linux-gnu/32/libgfortran/.libs/)

I copied this version of libgfortran.so.3, and went to the directory where my program was expecting to find libgfortran.so.3. I replaced the old one (the old libgfortran.so.3) with the new one (the one we just copied).

The problem instantly went away. I hope this helps you too!

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top