Why do I receive "terminate called after throwing an instance of '(anonymous namespace)​::DisplayE​rror' what(): No display available. Aborted (core dumped)" when installing MATLAB or other MathWorks Products on Linux?

419 views (last 30 days)
Why do I receive the following error when attempting to install MATLAB or other MathWorks Products on Linux?
terminate called after throwing an instance of '(anonymous namespace)::DisplayError'
what(): No display available.
Aborted (core dumped)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 19 May 2020
This error can occur if you are attempting to install MATLAB or other MathWorks Products with the MathWorks Installer as the root user due to root not having a display variable set up.
To resolve this error, please install MATLAB or other MathWorks Products with a user account.
  7 Comments

Sign in to comment.

More Answers (3)

Jeremie Fish
Jeremie Fish on 19 Nov 2020
Edited: MathWorks Support Team on 24 Jun 2021
I ran into this issue when trying to install remotely on a server using ubuntu 20.04. The issue was fixed by allowing X11 port forwarding which can be accomplished as described here:
So this is a display variable issue.
  2 Comments
Mehedi Hasan
Mehedi Hasan on 29 Apr 2022 at 17:21
I am getting this after trying to allow X11 port according to the link :
"Unable to init server: Could not connect: Connection refused
(gedit:26691): Gtk-WARNING **: 12:18:59.420: cannot open display:"
can anyone please help me

Sign in to comment.


Taichi Kurayama
Taichi Kurayama on 19 Jun 2021
Edited: Taichi Kurayama on 19 Jun 2021
Hi, I have same problem but, I can solve as follows;
please type
> bash install
I don't know why, but matlab was installed correctly by these script.
https://jp.mathworks.com/matlabcentral/answers/511690-matlab-2020a-no-display-available-error-on-ubuntu

Ondrej Tichacek
Ondrej Tichacek on 16 Mar 2021
I got the same error using
bash ./install -inputFile installer_input.txt
and using the File Installation Key in the installer_input.txt
Turns out the solution was to use
bash ./install -v -inputFile installer_input.txt
and monitor the log output in
/tmp/mathworks_<username>.log

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!