我正在编写一个从源代码安装Qt的dockerfile:
来自ubuntu:仿生
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 …
问题是因为你使用的是Zip版本,它有Windows的行尾风格,这在linux上不起作用。
为了验证您是否可以在执行之前将其添加到Dockerfile ./configure 这会将它转换为Linux的行尾风格。
./configure
注意:使用 unzip -a 虽然提取qt.zip将无法正常工作,因为我已经测试过了
unzip -a
sed -i 's/\r//g' ./configure && ./configure
它会工作,但它也会开始引发其他错误,原因与您在下面看到的相同:
+ 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
所以为了解决整个问题,你需要下载 tar.gz 适用于Linux环境的版本
tar.gz