Fedora 25上的Qt Creator:“找不到有效的工具包”

问题描述 投票:3回答:3

如果我尝试在Qt Creator中打开现有项目,我总会得到“找不到有效的工具包”。

我发现了很多关于此的问答,但在我的安装中,我无法选择有效的Qt版本,因为:

在Build Run-> Kids-> Desktop-> Qt Version:None

我在这个领域看不到任何其他条目。

如前所述:它是Fedora 25 x86_64版本。

Qt Creator在命令行中给出:

警告:找不到套件'qt.57.gcc_64_kit'。继续。

这是一个应该存在于某处的文件吗?可以在某处下载吗?手动配置似乎是不可能的,因为无法选择qt版本。

有没有我没有安装过的包装?有没有我可以用来获得有效安装的元数据包?

我安装的内容:

rpm -qa |抓住qt5

    dbusmenu-qt5-0.9.3-0.11.20150604.fc24.x86_64
    qt5-qtbase-gui-5.7.0-3.fc25.x86_64
    qt5-qtwebchannel-5.7.0-2.fc25.x86_64
    qt5-qttools-static-5.7.0-3.fc25.x86_64
    qt5-qtconfiguration-devel-0.3.1-2.fc24.x86_64
    adwaita-qt5-0.4-3.fc25.x86_64
    qt5-qtsvg-devel-5.7.0-2.fc25.x86_64
    qt5-qtbase-common-5.7.0-3.fc25.noarch
    qt5-qtlocation-devel-5.7.0-2.fc25.x86_64
    qt5-qttools-libs-designer-5.7.0-3.fc25.x86_64
    qt5-qtx11extras-devel-5.7.0-2.fc25.x86_64
    qt5-qtserialport-5.7.0-2.fc25.x86_64
    qt5-qttools-devel-5.7.0-3.fc25.x86_64
    qt5-qtconfiguration-0.3.1-2.fc24.x86_64
    qt5-qtwayland-devel-5.7.0-2.fc25.x86_64
    qt5-qttools-libs-clucene-5.7.0-3.fc25.x86_64
    qt5-qtlocation-5.7.0-2.fc25.x86_64
    quazip-qt5-0.7.2-1.fc25.x86_64
    qt5-qttools-libs-designercomponents-5.7.0-3.fc25.x86_64
    qt5-qttools-5.7.0-3.fc25.x86_64
    qt5-qtenginio-devel-1.6.1-2.fc25.x86_64
    qt5-linguist-5.7.0-3.fc25.x86_64
    qt5-qtwebsockets-devel-5.7.0-1.fc25.x86_64
    qt5-qtconnectivity-devel-5.7.0-2.fc25.x86_64
    qt5-qtsvg-5.7.0-2.fc25.x86_64
    qt5-qtquickcontrols-5.7.0-1.fc25.x86_64
    qt5-qtwayland-5.7.0-2.fc25.x86_64
    qt5-devel-5.7.0-9.fc25.noarch
    qt5-qtxmlpatterns-5.7.0-2.fc25.x86_64
    qt5-qtwebkit-5.7.0-2.fc25.x86_64
    qt5-qtserialport-devel-5.7.0-2.fc25.x86_64
    qt5-qtaccountsservice-devel-0.6.0-2.fc24.x86_64
    qt5-qttools-libs-help-5.7.0-3.fc25.x86_64
    qt5-qtmultimedia-5.7.0-2.fc25.x86_64
    qt5-qtimageformats-5.7.0-2.fc25.x86_64
    qt5-qtsensors-5.7.0-2.fc25.x86_64
    qt5-qtdoc-5.7.0-1.fc25.noarch
    qt5-designer-5.7.0-3.fc25.x86_64
    qt5-qtbase-static-5.7.0-3.fc25.x86_64
    qt5-qtenginio-1.6.1-2.fc25.x86_64
    qt5-qt3d-5.7.0-2.fc25.x86_64
    qt5-qtbase-5.7.0-3.fc25.x86_64
    qt5-qtdeclarative-devel-5.7.0-2.fc25.x86_64
    qt5-rpm-macros-5.7.0-9.fc25.noarch
    qt5-qhelpgenerator-5.7.0-3.fc25.x86_64
    qt5-qtwebsockets-5.7.0-1.fc25.x86_64
    qt5-qtconnectivity-5.7.0-2.fc25.x86_64
    phonon-qt5-4.9.0-3.fc25.x86_64
    qt5-qtscript-5.7.0-2.fc25.x86_64
    qt5-qtwebchannel-devel-5.7.0-2.fc25.x86_64
    qt5-gstreamer-devel-1.2.0-11.fc25.x86_64
    qt5-qtaccountsservice-0.6.0-2.fc24.x86_64
    phonon-qt5-backend-gstreamer-4.9.0-1.fc25.x86_64
    qt5-qtscript-devel-5.7.0-2.fc25.x86_64
    qt5-qtbase-devel-5.7.0-3.fc25.x86_64
    qt5-qtx11extras-5.7.0-2.fc25.x86_64
    polkit-qt5-1-0.112.0-8.fc25.x86_64
    qt5-qdoc-5.7.0-3.fc25.x86_64
    qt5-qtdeclarative-static-5.7.0-2.fc25.x86_64
    qt5-qtwebkit-devel-5.7.0-2.fc25.x86_64
    qt5-gstreamer-1.2.0-11.fc25.x86_64
    qt5-qtdeclarative-5.7.0-2.fc25.x86_64
    qt5-qtsensors-devel-5.7.0-2.fc25.x86_64
    qt5-qttools-common-5.7.0-3.fc25.noarch
    qt5-qtmultimedia-devel-5.7.0-2.fc25.x86_64
    qt5-qtxmlpatterns-devel-5.7.0-2.fc25.x86_64
    qt5-qt3d-devel-5.7.0-2.fc25.x86_64
qt qt-creator fedora-25
3个回答
4
投票

我也在Fedora 25上用Qt Creator开发,它对我有用。

以下是我通常的做法:

dnf install make gcc-c++ gdb
dnf install qt5*-devel
dnf install qt-creator

在此之后,我在一个新的Fedora 25上安装了一个有效的Qt Creator配置(我昨天从头开始安装)。

说实话,我不确定你可能做错了什么,但我有一些想法:

  • 您是从先前的操作系统版本升级还是将以前的Qt Creator版本的配置复制到新安装中?
  • 检查您是否安装了编译器和构建环境(makegcc,...)
  • 如果它的配置已损坏,您可以尝试删除~/.config/QtProject,Qt Creator可能会识别您的内容。
  • 如果项目的*.pro.user文件可能是由之前的Qt Creator版本生成的,请尝试删除它

无论如何,您可以相对轻松地修复配置。

  • 转到工具 - >选项
  • 选择Build&Run
  • 在“编译器”选项卡上,您应该在自动检测到的部分中看到已安装的编译器。如果您安装了编译器但无法识别,请手动将其添加到此处。
  • 在Qt版本选项卡上,我从Fedora仓库安装的版本(目前为5.​​7.0)出现在手册部分(即使我没有手动添加)。您可以通过浏览/usr/bin/qmake-qt5来添加它。
  • 在Kits选项卡上,我有一个名为Desktop的手动条目,它基本上设置为使用上面提到的编译器和Qt版本。

2
投票

我知道了:

qtcreator无法找到我的qmake安装,因为在fedora包中qmake是:

-rwxr-XR-X。 2 root root 2921520 19. Jul 14:51 / usr / bin / qmake-qt5

添加软链接

lrwxrwxrwx。 1根根18 5. Dez 17:17 / usr / bin / qmake - > / usr / bin / qmake-qt5

没有帮助!

你必须通过以下方式指向正确的qmake:

构建和运行 - >工具包 - >手动 - >桌面 - > Qt-版本 - >管理 - >“选择带文件浏览器的qmake”

现在它似乎找到了一个qt版本。在“详细信息”中,对话框打印“Qt版本5.7.0 for Desktop”

为什么没有简单的输出:“找不到qmake”?

好吧,似乎有点特别的fedora安装qmake到不同的文件名。


1
投票

基于@SteeveDroz在Fedora 29上为我工作的评论:

删除shell脚本的路径,然后选择/us/bin/qmake-qt5。现在它没有抱怨错误的版本。

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.