5

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.

jpnurmi
  • 5,716
  • 2
  • 21
  • 37
p.kumar
  • 77
  • 1
  • 2
  • 4
  • 1
    I'm voting to close this question as off-topic because this ***maybe*** better suited for Unix & Linux SE! – Am_I_Helpful Nov 26 '16 at 12:22
  • 1
    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 Nov 27 '16 at 13:42

4 Answers4

1

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
Community
  • 1
  • 1
Velkan
  • 7,067
  • 6
  • 43
  • 87
0

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

lesley
  • 1
  • While this link may answer the question, link only answers are discouraged on Stack Overflow, you can improve this answer by taking vital parts of the link and putting it into your answer, this makes sure your answer is still an answer if the link gets changed or removed :) – WhatsThePoint Mar 13 '18 at 08:59
0

aqtinstall is a good option: https://github.com/miurahr/aqtinstall

It's a simple command line tool to download and install any Qt version. It's a fork of my old qli-installer script.

LNJ
  • 304
  • 2
  • 13
0

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

ssh <username>@<ip> -X 
Obsidian
  • 3,719
  • 8
  • 17
  • 30