2

I am running a Docker file that does a non-interactive installation. The installation fails with a DISPLAY error. I can confirm that the non-interactive install works on a Ubuntu 14.04 VM with a display. I'm trying to install on a development server without a display.

Here is the output:

Step 15/21 : ENV QT_VERSION_A=5.8
---> Using cache
---> 585508f8fb4e
Step 16/21 : ENV QT_VERSION_B=5.8.0
---> Using cache
---> 32eb654acb19
Step 17/21 : ENV QT_VERSION_SCRIPT=580
---> Using cache
---> 7be314d66824
Step 18/21 : RUN wget https://download.qt.io/archive/qt/${QT_VERSION_A}/${QT_VERSION_B}/qt-opensource-linux-x64-${QT_VERSION_B}.run
---> Using cache
---> b16f68a4774e
Step 19/21 : RUN chmod +x qt-opensource-linux-x64-${QT_VERSION_B}.run
---> Using cache
---> dcd41dd5c287
Step 20/21 : COPY qt-noninteractive.qs /qt-noninteractive.qs
---> Using cache
---> 72c46b2abe23
Step 21/21 : RUN ./qt-opensource-linux-x64-${QT_VERSION_B}.run --script qt-noninteractive.qs
---> Running in e75d96617513
QXcbConnection: Could not connect to display
Aborted (core dumped)

Is there an option I can give where it doesn't need a display?

I tried going the non-GUI install apt-get method on Ubuntu to install Qt but the problem is 'apt-get qt5-default' does not contain Qt5 WebEngine which I require. Any help would be appreciated.

Here's the Docker File Qt install snippet:

ENV QT_VERSION_A=5.8
ENV QT_VERSION_B=5.8.0
ENV QT_VERSION_SCRIPT=580

RUN wget https://download.qt.io/archive/qt/${QT_VERSION_A}/${QT_VERSION_B}/qt-opensource-linux-x64-${QT_VERSION_B}.run

RUN chmod +x qt-opensource-linux-x64-${QT_VERSION_B}.run

COPY qt-noninteractive.qs /qt-noninteractive.qs

RUN ./qt-opensource-linux-x64-${QT_VERSION_B}.run --script qt-noninteractive.qs
Ankur Shah
  • 125
  • 12
  • Try using `-platform minimal`, should help with headless X installs. Also check this appveyor file, which has steps (ie, install Qt on CI) https://github.com/stofte/gitbumr/blob/develop/appveyor.yml – Svend Apr 15 '19 at 07:43

2 Answers2

0

I tried going the non-GUI install apt-get method on Ubuntu to install Qt but the problem is 'apt-get qt5-default' does not contain Qt5 WebEngine which I require

You could (additionally to the apt-get qt5-default) install the package which does contain it. If you check https://packages.ubuntu.com/search?keywords=web+engine there are the packets. Maybe libqt5webengine5 or libqt5webenginewidgets5. So your command would then be:

apt-get qt5-default libqt5webengine5
max630
  • 8,762
  • 3
  • 30
  • 55
0

First, ensure you have the silent option enabled in your .qs controller

function Controller() {
    gui.setSilent(true);

Then, use the --platform minimal option when calling the Qt Installer.

RUN ./qt-opensource-linux-x64-${QT_VERSION_B}.run --platform minimal --script qt-noninteractive.qs