MATLAB linking error - CentOS 7 - R2020b

117 次查看(过去 30 天)
I've installed MATLAB R2020b on CentOS 7 and get the following error:
$ matlab
MATLAB is selecting SOFTWARE OPENGL rendering.
/Home/matlab/matlab/bin/glnxa64/MATLAB: symbol lookup error: /Home/matlab/matlab/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: undefined symbol: __cxa_thread_atexit_impl
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/software/libexec/gcc/x86_64-redhat-linux/6.1.1/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,go,lto --prefix=/software --mandir=/software/share/man --infodir=/software/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --disable-libgcj --without-isl --enable-libmpx --enable-gnu-indirect-function --with-arch_32=x86-64 --with-arch=nocona --with-tune=core2 --with-multilib-list=m64 --oldincludedir=/software/include --build=x86_64-redhat-linux
Thread model: posix
gcc version 6.1.1 20160510 (Red Hat 6.1.1-2) (GCC)
Which compiler version and dependencies do you need to install to have MATLAB working?
Thank you,
Heinz
  4 个评论
John Rabo
John Rabo 2021-1-11
Hi Heinz, were you able to resolve this problem? I'm having the same problem.
gerco hassink
gerco hassink 2021-6-9
编辑:gerco hassink 2021-6-9
I have the same problem on centos 7.6.1810.
I checked the solutions from Sai Sri Pathuri below, but they don't work and don't seem to make sense as well, but that could be me of course. Any help would be appreciated. Due to other software we prefer not to update the system too much
matlab installation worked fine
MATLABWindow runs as well
/usr/local/MATLAB/R2020b/bin/./matlab -nosplash -nodesktop
gives:
MATLAB is selecting SOFTWARE OPENGL rendering.
and then the prompt again
/usr/local/MATLAB/R2020b/bin/glnxa64/MATLAB -nosplash -nodesktop
gives:
/usr/local/MATLAB/R2020b/bin/glnxa64/MATLAB: symbol lookup error: /usr/local/MATLAB/R2020b/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: undefined symbol: __cxa_thread_atexit_impl
gcc -v
Ingebouwde specs worden gebruikt.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc versie 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)

请先登录,再进行评论。

回答(3 个)

Jonathan Rosalki
Jonathan Rosalki 2022-7-14
I had a similar problem (trying to run in python3.8 "import matlab.engine") and was pointed at this solution by the kind people at Mathworks (thank you):
  • Could you please try setting the "LD_PRELOAD" environment variable by running:
  • export LD_PRELOAD="/home/local/MATLAB/R2022a/bin/glnxa64/glibc-2.17_shim.so"
  • Note that since this is a local environment variable the fix will not apply to any workers. The fix can be applied everywhere by adding the environment variable as a user or system wide variable.
Maybe that will help in this situation?
  1 个评论
Jeremy
Jeremy 2023-2-8
Thank you. This helped me track down a solution to this error:
Python Error: ModuleNotFoundError: No module named 'libmwbuffer'
When running this:
py.numpy.array([1 2; 3 4])
On CentOS 7, with rh-python38-python-3.8.13-1.el7.x86_64 installed, other Matlab-Python interactions seemed to work, but not NDArray.
Matlab was looking for: libpython3.8.so.1.0
Our file was called: libpython3.8.so
(In our case it was in /opt/rh/rh-python38/root/usr/lib64/)
I just made a symlink, and now it works.
ln -s libpython3.8.so libpython3.8.so.1.0
Thanks again.

请先登录,再进行评论。


Sai Sri Pathuri
Sai Sri Pathuri 2020-9-24

gerco hassink
gerco hassink 2021-7-22
Turned out that it is a version problem. Matlab 2020 uses libstdc++.so.6.0.25 and our Centos 7 and other software on it use *.19 and we did not want to upgrade these. the only solution was to install an older version of matlab R2017b and this worked perfectly.

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

产品


版本

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by