Clear Filters
Clear Filters

MATLAB linking error - CentOS 7 - R2020b

105 views (last 30 days)
Heinz Stockinger
Heinz Stockinger on 22 Sep 2020
Commented: Jeremy on 8 Feb 2023
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/ undefined symbol: __cxa_thread_atexit_impl
$ gcc -v
Using built-in specs.
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= --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,
John Rabo
John Rabo on 11 Jan 2021
Hi Heinz, were you able to resolve this problem? I'm having the same problem.
gerco hassink
gerco hassink on 9 Jun 2021
Edited: gerco hassink on 9 Jun 2021
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
MATLAB is selecting SOFTWARE OPENGL rendering.
and then the prompt again
/usr/local/MATLAB/R2020b/bin/glnxa64/MATLAB -nosplash -nodesktop
/usr/local/MATLAB/R2020b/bin/glnxa64/MATLAB: symbol lookup error: /usr/local/MATLAB/R2020b/bin/glnxa64/../../sys/os/glnxa64/ undefined symbol: __cxa_thread_atexit_impl
gcc -v
Ingebouwde specs worden gebruikt.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl= --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)

Sign in to comment.

Answers (3)

Jonathan Rosalki
Jonathan Rosalki on 14 Jul 2022
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/"
  • 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 Comment
Jeremy on 8 Feb 2023
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:
Our file was called:
(In our case it was in /opt/rh/rh-python38/root/usr/lib64/)
I just made a symlink, and now it works.
ln -s
Thanks again.

Sign in to comment.

Sai Sri Pathuri
Sai Sri Pathuri on 24 Sep 2020

gerco hassink
gerco hassink on 22 Jul 2021
Turned out that it is a version problem. Matlab 2020 uses 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.


Find more on Introduction to Installation and Licensing in Help Center and File Exchange




Community Treasure Hunt

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

Start Hunting!