问题
I compiled some codes in Matlab on a Linux system, and .mexa64 files has been generated, but in run time, I get the following error:
Invalid MEX-file '/*.mexa64': /matlab-8.5/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `CXXABI_1.3.8' not found.
i tried setting -rpath in make file by two following commands in matlab make file: LDFLAGS="\$LDFLAGS -rpath=/usr/local/GNU/glibc-2.22/lib/"
LDFLAGS="\$LDFLAGS -dynamic-linker=/usr/local/GNU/glibc-2.22/lib/ld-linux-x86-64.so.2"
But, it cannot solve the problem.
回答1:
This worked for my case: Goto your matlab installation: cd /usr/local/MATLAB/R2015a/sys/os/glnxa64 and rename these two files: sudo mv libstdc++.so.6 libstdc++.so.6.orig sudo mv libgcc_s.so.1 libgcc_s.so.1.orig
来源:https://stackoverflow.com/questions/35644956/invalid-mex-file-error-libstd-version