英文:
Building Qt6 Qt Creator inside Docker Ubuntu
问题
我的目标是在Docker容器中安装并运行Qt Creator。我从hub下载了Ubuntu镜像并运行了apt-get update && apt-get install ubuntu-server -y
命令。(我将使用VcXsrv X Server启动GUI)。
我尝试根据这个链接https://wiki.qt.io/Building_Qt_Creator_from_Git_on_Ubuntu_22.04中的信息来下载和构建Qt Creator,每个步骤都成功,除了构建部分。
可惜,目前不能从该网站下载二进制文件。
运行该指南第6步的第一行代码返回了一个错误:
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt6QmlCompilerPrivate/Qt6QmlCompilerPrivateTargets.cmake:108 (message):
The imported target "Qt6::QmlCompilerPrivate_resources_1" references the
file
"/usr/lib/x86_64-linux-gnu/objects-None/QmlCompilerPrivate_resources_1/.rcc/qrc_builtins.cpp.o"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/x86_64-linux-gnu/cmake/Qt6QmlCompilerPrivate/Qt6QmlCompilerPrivateTargets.cmake"
but not all the files it references.
Call Stack (most recent call first):
/usr/lib/x86_64-linux-gnu/cmake/Qt6QmlCompilerPrivate/Qt6QmlCompilerPrivateConfig.cmake:60 (include)
/usr/lib/x86_64-linux-gnu/cmake/Qt6/Qt6Config.cmake:219 (find_package)
src/plugins/qmldesigner/CMakeLists.txt:4 (find_package)
qtchooser返回:
qtchooser -print-env
QT_SELECT="qt6"
QTTOOLDIR="/usr/lib/qt6/bin"
QTLIBDIR="/usr/lib/x86_64-linux-gnu"
所有文件似乎都在正确的位置,所以我不太清楚应该在哪里寻找解决方案。
英文:
My goal is to install and run Qt Creator inside of Docker container. I downloaded Ubuntu image from hub and ran apt-get update && apt-get install ubuntu-server -y
. (I'll be using VcXsrv X Server to launch GUI).
I was trying to download and build Qt Creator using info from this link https://wiki.qt.io/Building_Qt_Creator_from_Git_on_Ubuntu_22.04 as a guide, every other step was successfull except the build part.
Sadly, downloading binaries from the site is not an option for now.
Running the first line from step 6 of that guide has returned an error:
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt6QmlCompilerPrivate/Qt6QmlCompilerPrivateTargets.cmake:108 (message):
The imported target "Qt6::QmlCompilerPrivate_resources_1" references the
file
"/usr/lib/x86_64-linux-gnu/objects-None/QmlCompilerPrivate_resources_1/.rcc/qrc_builtins.cpp.o"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/x86_64-linux-gnu/cmake/Qt6QmlCompilerPrivate/Qt6QmlCompilerPrivateTargets.cmake"
but not all the files it references.
Call Stack (most recent call first):
/usr/lib/x86_64-linux-gnu/cmake/Qt6QmlCompilerPrivate/Qt6QmlCompilerPrivateConfig.cmake:60 (include)
/usr/lib/x86_64-linux-gnu/cmake/Qt6/Qt6Config.cmake:219 (find_package)
src/plugins/qmldesigner/CMakeLists.txt:4 (find_package)
qtchooser returned:
qtchooser -print-env
QT_SELECT="qt6"
QTTOOLDIR="/usr/lib/qt6/bin"
QTLIBDIR="/usr/lib/x86_64-linux-gnu"
All files seems to be in place, so I'm not really know where to look for the solution.
答案1
得分: 1
错误发生在 qmldesigner
中。
如果您不需要 QML 设计器插件,您可以使用 -DWITH_QMLDESIGNER=OFF
配置 Qt Creator,这个错误应该消失。
英文:
The error occurs in qmldesigner
.
If you don't need the QML Designer plugin, you can configure Qt Creator with -DWITH_QMLDESIGNER=OFF
and this error should go away.
答案2
得分: 0
不确定你是否已经解决了这个问题,但我遇到了类似的问题,并通过从仓库中检出一个较旧的版本来解决它,例如v10.0.1。
英文:
Not sure if you got anywhere with this, but I had a similar problem and solved it by checking out an older version from the repo. e.g. v10.0.1
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论