MATLAB linking error - CentOS 7 - R2020b

조회 수: 71 (최근 30일)
Heinz Stockinger
Heinz Stockinger 2020년 9월 22일
댓글: Enlighten 2024년 8월 5일
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.
  댓글 수: 1
Enlighten
Enlighten 2024년 8월 5일
this is corret.another ways is to update your gcc version to 10.3.0

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by