Borrar filtros
Borrar filtros

MATLAB 2020a No display available error on Ubuntu

78 visualizaciones (últimos 30 días)
Zheng Zhao
Zheng Zhao el 19 de Mzo. de 2020
Comentada: Wei el 19 de Nov. de 2022
I'm installing MATLAB 2020a on Ubuntu 18.04 LTS.
However when I execute in terminal with:
sudo bash install
I got error
No protocol specified
terminate called after throwing an instance of '(anonymous namespace)::DisplayError'
what(): No display available.
Aborted
For some reason it works without using sudo
bash install
But I have to use sudo, as I need to create matlab folder in /usr/local/
How should I solve this?
  9 comentarios
Frederik Aidt
Frederik Aidt el 15 de Dic. de 2020
Works here also. Thanks!
Samuel Gray
Samuel Gray el 19 de Dic. de 2020
Editada: Samuel Gray el 20 de Dic. de 2020
...just as well, the first time that I tried to install R2020b on CentOS8 using the standard sudo ./install it shagged the x11 configuration though admittely this is an AMD laptop with onboard AMD graphics...I reinstalled CentOS8 and now it won't even run sudo ./install. So the legacy installer seems to have finished without a problem...now if I can just actually start Matlab...
ah, so
this time I did not use sudo, just called the installer as a regular user...
still got an X glitch but only for a moment then the installer screen came up as usual.
./bin/glnxa64/install_unix_legacy -input_file=./custom_installer_input.txt
...but that won't let me install into /usr/local so sudo it is...and that won't launch the installer!
Back to regular user but installing Matlab to my home account, ok that works...
Wow it's downloading 1.241MB just for for the core Matlab code and 29 toolkits! I already have downloaded 277MB just to run the installer...must be a lot of elves running around at Mathworks writing code especially since there are so many more toolkits that I could not download with one trial license! There must be an entire business-school, engineering, computer-science and computer graphics school of stuff in Matlab now.
Anyway I am glad that this time the installer started (twice) using sudo without blowing-up the x window manager this time and forcing me t wipe & reinstall CentOS8. Which probably someone else could have fixed, but I gave up trying to fix it after a week and just started over.

Iniciar sesión para comentar.

Respuestas (3)

Alejandro Verri
Alejandro Verri el 2 de Feb. de 2021
Editada: Alejandro Verri el 2 de Feb. de 2021
Effectively, in order to create the folders /usr/local/ you must be superuser, but the installation can and should be done with your user and avoid some know issues using root accounts with X11 video. A simple way to install it is to create the installation folders in usr/local and then change its owner (or group), before running the installer
sudo mkdir /usr/local/MATLAB
sudo mkdir /usr/local/MATLAB/R2020a
sudo chown YOUR_USERNAME /usr/local/MATLAB
sudo chown YOUR_USERNAME /usr/local/MATLAB/R2020a
./install
When the installer asks you if it should create symlinks in /usr/bin, simply change the destination to your local ~/Desktop or any other local folder and then, as superuser you just move those symlinks to the bin locations
sudo cp ~/Desktop/matlab /usr/bin
sudo cp ~/Desktop/mex /usr/bin
  1 comentario
Alejandro Lorite Mora
Alejandro Lorite Mora el 8 de Oct. de 2021
It worked for me, but the final step should be:
sudo cp ~/Desktop/matlab /usr/bin -P
sudo cp ~/Desktop/mex /usr/bin -P

Iniciar sesión para comentar.


Nick Warren
Nick Warren el 10 de Nov. de 2020
Didn't work for me, presumably as I was SU'ing in as root, rather than logging in directly as root. This worked for me:
user@myserver:~$ xauth list
myserver/unix:11 MIT-MAGIC-COOKIE-1 27fbcf94c244d6946e39bd7a11d41453
myserver/unix:10 MIT-MAGIC-COOKIE-1 b00729a0755ddefa14a8fae6c677efd3
user@myserver:~$ echo $DISPLAY
localhost:10.0
user@myserver:~$ sudo su --login root
root@myserver:~# export DISPLAY=':10.0'
Add magic cookie for matching display - 10 in this case:
root@myserver:~# xauth add myserver/unix:10 MIT-MAGIC-COOKIE-1 b00729a0755ddefa14a8fae6c677efd3
Run the installer:
root@myserver:~# ~/path-to-matlab-installer/install
  2 comentarios
Zeeshan Nadir
Zeeshan Nadir el 23 de Sept. de 2022
Worked like a charm. Thanks so much.
Herman Wong
Herman Wong el 8 de Oct. de 2022
Awesome. Works like a charm instead of 'xhost +SI:localuser:root' solution others referring to.

Iniciar sesión para comentar.


Yuval Zukerman
Yuval Zukerman el 1 de Feb. de 2021
The response from Philippe Dreesen appears to be working:
Open a terminal as regular user and execute "xhost +" to allow connections to the user's X11 server
user@computer $ xhost +
>> access control disabled, clients can connect from any host
Then open a terminal as root and export the DISPLAY and run the installer:
root@computer # export DISPLAY=:0.0
root@computer # ./install
I was also able to install using:
sudo ./install
  1 comentario
Wei
Wei el 19 de Nov. de 2022
Hi, Dear Yuval.
i had a simiar proble, but when i try to excute the ./install or sudo ./install, it jump a blank window like this. do you know any way to fix this? Thanks

Iniciar sesión para comentar.

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by