Why am I getting an error installing MATLAB on Ubuntu 24.04
475 views (last 30 days)
Show older comments
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 (3)
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
5 Comments
YU-KUAN
on 12 Mar 2025 at 23:40
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.
Mialy
on 2 Apr 2025 at 11:31
Edited: Mialy
on 3 Apr 2025 at 12:53
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.
Yann MORERE
on 1 Apr 2025 at 13:36
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
on 1 Apr 2025 at 14:18
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.
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.
For more information on the issue, please refer to this MATLAB Answers thread by MathWorks: https://www.mathworks.com/matlabcentral/answers/643300-why-do-i-receive-the-error-libstdc-so-6-version-glibcxx_3-4-22-not-found-when-trying-to-star
I hope this helps!
1 Comment
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
See Also
Categories
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!