Why am I getting an error installing MATLAB on Ubuntu 24.04

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)

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

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.

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

After doing this with R2021b and Ubuntu 24.04 I still get the error:
$ ./bin/glnxa64/MATLABWindow
./bin/glnxa64/MATLABWindow: symbol lookup error: /lib/x86_64-linux-gnu/libharfbuzz.so.0: undefined symbol: FT_Get_Color_Glyph_Layer
A spot of Googling indicated this error is related to an older free type face library. So I also removed bin/glnxa64/libfreetype.so.6.16.0 The installer started after this. R2024a did not need the fonts removed and the installer started after the files you list were removed.
Here's how I got Simulink with Matlab R2018a to work on Ubuntu 24.04.
As root or sudo
1) Install all the dependencies if any are missing
apt install ca-certificates debianutils libasound2t64 libatomic1 libc6 libcairo-gobject2 libcairo2 libcap2 libcrypt1 libcups2t64 libdrm2 libfontconfig1 libfribidi0 libgbm1 libgdk-pixbuf-2.0-0 libgl1 libglib2.0-0t64 libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 libgtk-3-0t64 libice6 libltdl7 libnettle8t64 libnspr4 libnss3 libpam0g libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpixman-1-0 libsndfile1 libtirpc3t64 libudev1 libuuid1 libwayland-client0 libxcomposite1 libxcursor1 libxdamage1 libxfixes3 libxfont2 libxft2 libxinerama1 libxrandr2 libxt6t64 libxtst6 libxxf86vm1 locales locales-all make net-tools procps sudo unzip zlib1g
2) Assuming that Matlab is installed in /usr/local/MATLAB/R2018a
In /usr/local/MATLAB/R2018a/bin/glnxa64
mkdir exclude
mv libfreetype.* exclude/
In /usr/local/MATLAB/R2018a/cefclient/sys/os/glnxa64
mkdir exclude
mv libgio-2* exclude
mv libgmodule* exclude/
mv libglib* exclude/
I followed the instructions by Yu_Kuan and Rob. Indeed, the installer started after I removed the files but it does not seem to work properly: once my email adress entered, the interface seems to "freeze", the keyboard is not recognized anymore and I cannot enter my password.
Any suggestions, please?
Sadly, after 6 months of using, I came to a conclusion that the best way to install it on a linux machine is using a windows virtual machine.
The version I used was usable, but just usable.
My homework was creating an app using the app designer, and it was a nightmare using the linux UI.
A lot of UI buttons doesn't work(e.g., dropdown shows but you'll directly trigger the layer under upon clicking, missing right-click functions) and you have to find a way around, which is extremely annoying.
After switching to Windows, the installation is straightforward, the buttons work normally, the experience is entirely different.
Therefore, just believe that there is no Linux version of Matlab, and this makes your life easier.
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.
@Methlal Thank you so much!
Your comment is life saving.
Managed to make Matlab R2018a perfectly work in Ubuntu24.04

Sign in to comment.

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.
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

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.

This approach worked for me (Ubuntu 24.04, MATLAB R2025b) --
FIRST: Follow the directions in the MATLAB Installation Help .PDF documentation for Linux.
Specifically, open one or more Terminal windows to first run these:
unzip matlab_R2025b_Linux.zip -d ./matlab_R2025b_Linux
cd ./matlab_R2025b_Linux
And then these:
xhost +SI:localuser:root
sudo -H ./install
xhost -SI:localuser:root
SECOND: 'cd' to the root directory using 'cd ..' as many times as necessary.
THEN:
<Your_Command_Line_Prompt>:/$ cd usr
<Your_Command_Line_Prompt>:/usr$ cd local
<Your_Command_Line_Prompt>:/usr/local$ cd bin
<Your_Command_Line_Prompt>:/usr/local/bin$ mkdir MATLAB
<Your_Command_Line_Prompt>:/usr/local/bin$ cd MATLAB
<Your_Command_Line_Prompt>:/usr/local/bin/MATLAB$ mkdir R2025b
<Your_Command_Line_Prompt>:/usr/local/bin/MATLAB$
(I copied these from my terminal window after executing them.)
Check the box to create a symbolic link to this MATLAB installation, click on 'Continue'.
Everything should then proceed automatically.
.

Categories

Products

Release

R2024a

Asked:

on 5 Sep 2024

Answered:

on 17 Dec 2025

Community Treasure Hunt

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

Start Hunting!