4
votes

I am trying to install Qt on a Linux machine remotely from a Windows machine using PuTTY. When I run the command to install Qt on Linux I get the following error:

~/QT#  ./qt-unified-linux-x64-2.0.4-online.run
QXcbConnection: Could not connect to display
Aborted

Please suggest any workaround.

4
I'm voting to close this question as off-topic because this maybe better suited for Unix & Linux SE!Am_I_Helpful
Looks like the online installer requires a graphic user interface (X11 connection). You can either run an X server locally and tunnel the X connection through SSH or try if the offline installer can run without UI.Kevin Krammer

4 Answers

1
votes

You can use the software repository of that Linux distribution.

For example, if it's Debian or Ubuntu:

sudo apt-get install qtbase5-dev

But if you really want to use the installer (usually, when specific Qt version is needed), then try one of the options:

  • run an X server on that machine
  • use the --script option of the online installer (you'll have to write a script like here: https://stackoverflow.com/a/34032216/4742108), it will probably need UI anyways
  • see if the offline installer has an option to run without UI
0
votes

refer to here: https://community.nxp.com/message/532966 maybe use the cmd "export DISPLAY=:0" and it works

0
votes

I've written a little CLI version of the Qt Installer, using it should fix the problem. You can get it here.

It depends on p7zip-full, python3-requests and wget. Then just clone the git repo or download the single file from gitlab, make it executable and you can install Qt in the current directory by executing:

./qli-installer.py 5.11.3 linux desktop

On Mac OS X you might want to try:

./qli-installer.py 5.11.3 mac desktop

and also Qt for Windows, Android and iOS are working (more details in the README).

0
votes

Try to connect with ssh to the host machine using -X to enable X11 display:

ssh <username>@<ip> -X