Reputation: 1850
I'm writing a dockerfile that installs Qt from source:
FROM ubuntu:bionic
ARG QT_FILE_LINK=http://download.qt.io/official_releases/qt/5.11/5.11.3/single/qt-everywhere-src-5.11.3.zip
RUN apt-get update \
&& apt-get install -y --no-install-recommends build-essential
RUN wget --progress=bar:force -O qt.zip $QT_FILE_LINK
RUN echo "Unzipping..." && unzip -q qt.zip
RUN rm qt.zip && cd qt-everywhere-src-* && ls && ./configure \
-confirm-license -opensource \
-nomake examples -nomake tests -no-compile-examples \
-no-xcb \
-prefix "/usr/local/Qt"
ENTRYPOINT "/bin/bash"
The problem is that it fails on the ./configure
, even though you can see that the previous command, which is ls
, shows that there is indeed a configure
file.
It says
/bin/sh: 1: ./configure: not found
Upvotes: 0
Views: 194
Reputation: 11970
The problem because you are using the Zip version, it has Windows end of line style which does not work on linux.
In order to verify that you can add this to your Dockerfile right before executing ./configure
which will convert it to Linux end of line style.
NOTE: using
unzip -a
while extracting qt.zip will not work as i have tested it already
sed -i 's/\r//g' ./configure && ./configure
It will work but also it will start to raise other errors because of the same reason as you can see below:
+ cd qtbase
+ /qt-everywhere-src-5.11.3/qtbase/configure -top-level -confirm-license -opensource -nomake examples -nomake tests -no-compile-examples -no-xcb -prefix /usr/local/Qt
./configure: 49: exec: /qt-everywhere-src-5.11.3/qtbase/configure: not found
So in order to fix the whole issue you need to download the tar.gz
version which suitable for Linux environments
Upvotes: 1