Why am I getting an error installing MATLAB on Ubuntu 24.04

294 views (last 30 days)
I have just tried to download MATLAB onto Ubuntu 24.04 and it is not working.
When I run ./install within matlab_R2024a_Linux, this is the output:
terminate called after throwing an instance of 'std::runtime_error'
what(): Failed to launch web window with error: Unable to launch the MATLABWindow application. The exit code was: 1
Aborted (core dumped)
When I then run ./bin/glnxa64/MATLABWindow , this is the output:
./bin/glnxa64/MATLABWindow: /home/eric1/Downloads/matlab_R2024a_Linux/bin/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /lib/x86_64-linux-gnu/libgallium-24.2.1 - kisak-mesa PPA.so)
./bin/glnxa64/MATLABWindow: /home/eric1/Downloads/matlab_R2024a_Linux/bin/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /lib/x86_64-linux-gnu/libLLVM-17.so.1)
./bin/glnxa64/MATLABWindow: /home/eric1/Downloads/matlab_R2024a_Linux/bin/glnxa64/libstdc++.so.6: version `CXXABI_1.3.13' not found (required by /lib/x86_64-linux-gnu/libLLVM-17.so.1)
./bin/glnxa64/MATLABWindow: /home/eric1/Downloads/matlab_R2024a_Linux/bin/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /lib/x86_64-linux-gnu/libLLVM-17.so.1)
./bin/glnxa64/MATLABWindow: /home/eric1/Downloads/matlab_R2024a_Linux/bin/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /lib/x86_64-linux-gnu/libicuuc.so.74)
I have tried reading through these guides:
I have tried other solutions on Stack Over flow and nothing has worked.

Answers (5)

Yann MORERE
Yann MORERE on 1 Apr 2025
Hi there, same problem here, ubuntu 24.04 and matlab 2024a
I overcame the problem with this procedure :
mount the iso, go in the matlab install directory :
$ sudo -s
# export LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33"; ./install
When the window asks for email and password DO NOT USE THE MOUSE, USE TAB KEY to go next and ENTER KEY to validate.
After this I was able to install matlab.
After install, I need to run matlab with the LD_PRELOAD variable set :
$ export LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33"; matlab
If not, most of the things does not work even if matlab launches.
Hope this helps
  1 Comment
Rob Campbell
Rob Campbell on 1 Apr 2025
Thanks for this. I have since axed that PC for somewhat unrelated reasons. Maybe I will try Ubuntu 24.04 again when I next need to install Linux.

Sign in to comment.


YU-KUAN
YU-KUAN on 11 Sep 2024
Tried like 10 different ways but nothing works for 2024a (same on ubuntu 24.04)
Therefore I downloaded an earlier version (in my case i randomly chose 2021b) and follow the steps:
1. Re-do the install: failed the same way
2. Made sure all GLIBCXX version not found by running ./bin/glnxa64/MATLABWindow can be found using:
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBC
(If not, you may want to sudo apt install libstdc++6)
3. remove all ./bin/glnxa64/libstdc++* ./sys/os/glnxa64/libstdc++* ./sys/os/glnxa64/libgcc*
mkdir ./bin/glnxa64/exclude
mkdir ./sys/os/glnxa64/exclude
mv ./bin/glnxa64/libstdc++* ./bin/glnxa64/exclude
mv ./sys/os/glnxa64/libstdc++* ./sys/os/glnxa64/exclude
mv ./sys/os/glnxa64/libgcc ./sys/os/glnxa64/exclude
4. finally, redo the install
sudo -H ./install
  6 Comments
Mialy
Mialy on 2 Apr 2025
Edited: Mialy on 3 Apr 2025
Had the same issue trying to install 2024a on on a fresh Linux after upgrading workstation from Ubuntu 20.04 to 24.04 in order to have Matlab+Linux-compatible Nvidia driver for GPU parallelism (alas, 20.04's latest Nvidia drivers randomly freeze the computer). Got the same error messages and output as William from ./bin/glnxa64/MATLABWindow .
Before, I had no issues installing 2024a on 20.04.
Not being a Linux expert, and fearing I would break my OS with too much meddling, I resolved to test installing 2024b instead, and this time it worked, after instaling the dependencies from https://fr.mathworks.com/matlabcentral/answers/2018166-what-dependencies-are-needed-to-install-matlab-on-minimal-or-core-linux-installations.
Tried again to install 2024a afterwards, but nothing changes. Thus I think that only 2024b and above are meant to be straightforward compatible with Ubuntu 24.04.
Now, I am testing if everything (including GPU parallelism) works or not, and need to correct my previous 2024a big codes with the commands syntaxes changes made by 2024b.
Miguel
Miguel on 26 Jun 2025
@Methlal Thank you so much!
Your comment is life saving.
Managed to make Matlab R2018a perfectly work in Ubuntu24.04

Sign in to comment.


Johannes
Johannes on 12 May 2025
I know this answer is more than half a year after this issue, however, it might help others trying to install R2024a on Ubuntu 24.04 LTS and facing errors during / after installation.
I have resolved this problem somewhat differently than the previous answers. Regarding MATLAB R2024a running on Ubuntu 24.04 LTS.
Using the command ls -l /usr/lib/x86_64-linux-gnu/libstdc* you can find the installed libstdc++ library version on your system, in my case that is libstdc++.so.6.0.33.
Now, the following steps can be done to the installer files to replace the shipped libstdc++ library version with your locally installed one. I found that the mismatch of libstdc++ versions was the core issue that resulted in a plethora of other bugs / errors when MATLAB is started.
  1. Go to the installer files.
  2. Run find . -name "libstdc++*" This will display all occurrences of libstc++.so.6 symlinks and libstdc++.so.6.0.28 (in case of Matlab R2024a) shared library objects. Now, for each pair of symlink and so file, move those to a backup location outside the installer directory and then create, in place of the old libstdc++.so.6 symlink a new symlink to your system's libstdc++ using the command ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33 libstdc++.so.6
  3. Go to the installer directory and run the installer normally with ./install
Now, after installation, go to the installation directory of MATLAB and repeat the find & replace all libstdc++.so.6 files step as described above with the installer.
This, in the end, resolved this issue as well as another concurrent issue I was facing regarding some Java exceptions if MATLAB was installed without replacing the libstdc++ symlinks.

Gojo
Gojo on 8 Sep 2024
Hey William,
It appears that the libstdc++ library is missing the required GLIBCXX versions needed by MATLAB. You can use the MATLAB's libraries by either modifying the environment variables or by updating the libstdc++ libraries.
I hope this helps!
  1 Comment
Rob Campbell
Rob Campbell on 1 Nov 2024
The instructions you link to are for Ubunu 18.04 but we are having issues with 24.04. Further, we are having trouble with the install and the instructions are for issues where MATLAB has already been installed. I still can not install MATLAB on Ubuntu 24.04

Sign in to comment.


Star Strider
Star Strider on 29 May 2025
I recently (mid-May 2025) needed to install MATLAB R2025a on Ubuntu 24.04.
I downloaded and ran the MATLAB installer app. The installer launched easily, and everything went smoothly until it came to the destination directory. Again, with /usr/<user-name>/local/ it said that it couldn't create the directory. Using the previous approach (using sudo mkdir <pathname>) didn't work, so I noticed a hyperlink 'use default' near the lower left corner of that page in the installer window and clicked on it out of curiosity. That brought up a list box of different directories, so I clicked on the first (top) entry in the list. Almost magically the installation proceeded!
I still had to use:
sudo chown <user-name> /usr/local/bin/
to allow the installation to create the symbolic link, and after that, the installation proceeded to the end.
I confirmed that R2025a installed to /Ubuntu/usr/local/bin, by clicking through the directory GUIs until I found it. MATLAB R2025a launches and runs.
I'm new with Linux and still learning it, so I requested some assistance from MathWorks Tech Support to create the symbolic link. This approach worked for me on both my desktop and laptop, with Ubuntu 24.04 and R2025a installed on each the same day.
.

Categories

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

Products


Release

R2024a

Community Treasure Hunt

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

Start Hunting!