Why do I receive a "version `GLIBCXX_3.4.29' not found" error when installing the MATLAB Engine API for Python?

40 views (last 30 days)
I am using MATLAB R2024b on a Red Hat Enterprise Linux 8 machine, and I have tried to install the MATLAB Engine API for Python.
However, I am receiving the following error:
"ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by <custom_path>/MATLAB/R2024b/extern/bin/glnxa64/matlabmultidimarrayforpython.abi3.so)".
The system installation of libstdc++ on my machine is up to date, but only links up to GLIBCXX_3.4.25.
Why am I receiving this error and how can I install the MATLAB Engine API for Python?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 2 Jan 2025
Both MATLAB R2024b and RHEL8 ship with a libstc++ library. This error arises because the MATLAB Engine is searching for GLBCXX_3.4.29 in the libstc++ that shipped with RHEL8, rather than the one that shipped with MATLAB. This is because MATLAB is not installed in the default location ("/usr/local/MATLAB/R2024b").
To address this issue, please follow the pre-installation steps under "Linux" on the PyPI website page for MATLAB Engine API for Python.
These steps will guide you through manually adding the MATLAB "bin/architecture" directory to the environment variable LD_LIBRARY_PATH such that the MATLAB Engine can locate the GLBCXX_3.4.29 shipped with MATLAB R2024b.

More Answers (0)

Categories

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

Products


Release

R2024b

Community Treasure Hunt

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

Start Hunting!