libgfortran: version `GFORTRAN_1.4' not found

前端 未结 5 1171
旧时难觅i
旧时难觅i 2020-12-28 20:00

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/glnxa         


        
相关标签:
5条回答
  • 2020-12-28 20:17

    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.

    0 讨论(0)
  • 2020-12-28 20:21

    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:)

    0 讨论(0)
  • 2020-12-28 20:26

    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!

    0 讨论(0)
  • 2020-12-28 20:34

    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)

    0 讨论(0)
  • 2020-12-28 20:43

    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"
    
    0 讨论(0)
提交回复
热议问题