2016-12-05 126 views
1

如果我嘗試在Qt Creator中打開現有項目,我總是會收到「找不到有效的工具包」。Fedora 25上的Qt Creator:「沒有找到有效的工具包」

我發現了很多圍繞這個問答& A的,但在我安裝,我無法選擇有效的Qt版本,因爲:

在構建&運行 - > Kids->桌面 - > QtVersion:無

我在此字段中看不到任何其他條目。

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

Qt Creator中給出了駕駛室管理線:

警告:未找到套件 'qt.57.gcc_64_kit'。繼續。

這是一個應該存在的文件嗎?它可以在什麼地方下載?手動配置似乎是不可能的,因爲無法選擇qt版本。

有沒有我沒有安裝的軟件包?是否有任何元數據包可用於獲得有效的安裝?

我已經安裝了什麼:

轉-qa | grep的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 
+0

你從哪裏安裝Qt Creator? Fedora回購或Qt項目網站? – Venemo

+0

@Venemo:使用dnf包管理 – Klaus

+0

您能否給我們輸出'rpm -qa | grep qt5'(也許使用pastebin網站)? – Venemo

回答

1

我懂了:

qtcreator無法找到我的qmake的安裝,因爲Fedora的包QMAKE是:

-rwxr-XR-X。 2根根2921520 19月14點51分的/ usr /斌/ qmake的-QT5

添加軟鏈接到

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

沒有幫助!

你必須通過指向正確的QMAKE:

建設&運行 - >兒童 - >手動 - >桌面 - > Qt的版本 - >管理 - >

「與文件瀏覽器選擇QMAKE」

現在它似乎找到一個qt版本。 在「詳細信息」對話框中打印出「Qt version 5.7.0 for Desktop」

爲什麼沒有簡單的輸出:「找不到qmake」?

好吧,似乎是特別安裝qmake到不同文件名的fedora。

2

我也使用Qt Creator在Fedora 25上開發,它對我很有用。

下面是我平時做:

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 &運行
  • 在編譯器選項卡,你應該看到在自動檢測區間已安裝的編譯器。如果您安裝了編譯器但無法識別,請手動將其添加到此處。
  • 在Qt版本選項卡上,我從Fedora repo(當前爲5.7.0)安裝的版本出現在手動部分(即使我沒有手動添加它)。您可以通過瀏覽/usr/bin/qmake-qt5來添加它。
  • 在Kits選項卡上,我有一個叫做Desktop的手動條目,它基本上被設置爲使用上面提到的編譯器和Qt版本。
+0

謝謝。正如你在我的回答中看到的那樣,qtcreator根本無法看到我的qmake。正如你指出的那樣,qmake安裝在fedora上爲「/ usr/bin/qmake-qt5」。 qtcreator沒有找到它。我必須按照我的答案中所述手動設置。 – Klaus

+0

@Klaus這很有趣,因爲我不需要手動添加它,但它以某種方式仍然可以找到它...不知道這是如何發生的。 – Venemo

+0

是的,同事們幾乎完成了相同的安裝過程並且沒有任何問題;)如果運行在同一個謎團中,也許問答有助於他人找到解決方案。 「接近」意味着:我不知道我們做了什麼不同:-) – Klaus