How to fix MATLABWindow application failed to launch

454 visualizzazioni (ultimi 30 giorni)
I have just finished doing a fresh install of MATLAB R2024a on a Ubuntu 22.04 based operating system, and have replicated the problem with R2023b. To begin, the install script would fail with the following error:
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
I was able to rectify this issue by appending the following line to the install script before the final line:
export LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30"
Now that I have installed MATLAB, the issue nonetheless persists. When I try to open the add on window, I get the error:
Error using matlab.internal.cef.webwindow (line 403)
MATLABWindow application failed to launch. Unable to launch the MATLABWindow application. The exit code was: 1
I have tried the instructions listed here
and here
but I have had no luck.
Update: MATLAB is completely broken, and I cannot open any files. I am met with the following error:
Unable to open this file in the current system configuration. For more information, see Requirements.
For now, I will be reverting back to a previous system snapshot, as I have wasted enough time trying to fix this issue.
  1 Commento
Jose Rodolfo
Jose Rodolfo il 11 Feb 2025
export LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30"
helped me with another issue, that being
"Inconsistency detected by ld.so: ../elf/dl-tls.c: 613: _dl_allocate_tls_init: Assertion `listp != NULL' failed! ubuntu 245"
Whose solution present over many websites was not helping for my case. So I am just adding this here, in case anyone has this issue in the future. What I did was:
Add
load_sl_glibc_patch
to startup.m, and run the following command:
export LD_PRELOAD='/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33'
saved me from hours of suffering. Thank you

Accedi per commentare.

Risposte (4)

mohammad
mohammad il 17 Nov 2024
  4 Commenti
Marc Compere
Marc Compere il 15 Mar 2025
this worked for me on Ubuntu 24.04.2 LTS
The Matlab installation (apparently) comes with libstdc++ static libraries that are not compatible with Ubuntu. It's a stock kernel (`6.8.0-55-generic`) and stock development environment.
It's bizarre.
Repeating here from the github link just above:
cd <matlab-installation-dir>
cd sys/os/glnxa64
mkdir exclude
mv libstdc++.so.6 libstdc++.so.6.0.28 exclude
cd <matlab-installation-dir>
cd bin/glnxa64
mkdir exclude
mv libstdc++.so.6* exclude/
Matthew Lew
Matthew Lew il 27 Mag 2025
This worked for me on Ubuntu 24.04.2 LTS (6.11.0-26-generic). Thanks @Marc Compere!
I did not have any files named
libstdc++.so.6*
in
bin/glnxa64
though.

Accedi per commentare.


Nicholas
Nicholas il 9 Dic 2024
Modificato: Nicholas il 9 Dic 2024
I was able to solve this by installing packages specifically listed as missing by MATLABWindow. On attempting to run ./bin/glnxa64/MATLABWindow directly instead of from the installation script I got more specific error messages such as:
./bin/glnxa64/MATLABWindow
./bin/glnxa64/MATLABWindow: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
I ended up installing three libraries via apt-get (indicated by repeated run-install cycles): libgtk2.0-0, libnss3, and libasound2t64. Afterwards, the MATLAB installer window opened and MATLAB now appears to be working.
  4 Commenti
Mekus Meka
Mekus Meka il 5 Giu 2025
This solved my problem, after 2 days of searching and trying things.
Thank you so much Nicholas, may your days be long!
Tyler
Tyler il 3 Set 2025
This worked for me e on WSL2/Ubuntu 24.04 and matlab 2024b as well. Thank you kindly.

Accedi per commentare.


Saurabh
Saurabh il 26 Ago 2024
Modificato: Saurabh il 27 Ago 2024
Hi Soren,
Following the latest Update on the question, it seems you are not able to open any files and encountering the error that says:
Unable to open this file in the current system configuration. For more information, see Requirements.”
I guess 'libXss1' or 'libgconf-2-4' library is missing. In Ubuntu, make sure these are existing in your machine,
Run the following command to check if they exist:
sudo apt search libXss1
sudo apt search libgconf-2-4
If these are missing, install them by the following.
sudo apt-get libXss1
sudo apt-get libgconf-2-4
And relaunch MATLAB to confirm Live Editor is available.
You can refer to this MATLAB Answer that address this issue:
And regarding the issue that was encountered earlier you can refer to this MATLAB Answer:
  3 Commenti
Artemio Soto Breceda
Artemio Soto Breceda il 21 Feb 2025
There was a mistake, the lines to install them are:
sudo apt-get install libXss1
sudo apt-get install libgconf-2-4

Accedi per commentare.


Conderls
Conderls il 3 Dic 2024
I solved this issue with system's shared libs during installation and open matlab GUI
OS: EndeavourOS
## install
LD_PRELOAD=/usr/lib/libfreetype.so:/usr/lib/libstdc++.so:/usr/lib/libfontconfig.so ./install
## command to startup matlab
LD_PRELOAD=/usr/lib/libfreetype.so:/usr/lib/libstdc++.so:/usr/lib/libfontconfig.so matlab
or edit the app entry: matlab.desktop
[Desktop Entry]
Categories=Development;Education;Science;IDE;
Comment[en_US]=A high-level language for numerical computation and visualization.
Comment=A high-level language for numerical computation and visualization.
Exec=env LD_PRELOAD=/usr/lib/libfreetype.so:/usr/lib/libstdc++.so:/usr/lib/libfontconfig.so /usr/local/matlab/R2024b/bin/matlab -desktop
GenericName[en_US]=
GenericName=
Icon=matlab
MimeType=text/x-matlab;
Name[en_US]=Matlab
Name=Matlab
Path=
StartupNotify=false
Terminal=false
TerminalOptions=
Type=Application
Version=1.0
X-KDE-SubstituteUID=false
X-KDE-Username=
try with system's libfreetype/libstdc++ (there may be version suffix), give it a shot.

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Prodotti


Release

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by