libgfortran: version `GFORTRAN_1.4' not found

前端 未结 5 1219
旧时难觅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: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!

提交回复
热议问题