如何安裝Qt

如何安裝Qt

我正在嘗試使用以下命令構建 Linux 內核

make xconfig

但我得到這個錯誤:

$ make xconfig
  CHECK qt
* Unable to find the QT4 tool qmake. Trying to use QT3
*
* Unable to find any QT installation. Please make sure that
* the QT4 or QT3 development package ts correctly installed and
* either qmake can be found or install pkg-config or set
* the QTDIR environment variable to the correct location.
*
make[1]: *** No rule to make target `scripts/kconfig/.tmp_qtcheck', needed by `scripts/kconfig/qconf.o'.  Stop.
make: *** [xconfig] Error 2

所以我用Synaptic package工具來安裝Qt,現在有些Qt的東西已經安裝了,有些還沒安裝。它特別說有qmake,我從Synaptic安裝,又出現與上面相同的錯誤。

突觸管理器中的qt

我如何知道xconfig需要哪些包?

答案1

由於qmake我們libqt4-dev也需要,錯誤中沒有建議這一點,我們自己從我們需要的所有 qt 包中找出答案。

sudo apt-get install qt4-qmake libqt4-dev

或在 Synaptic 套件管理器中搜尋qt4-qmakelibqt4-dev並分別安裝。

所以我安裝了qt4-qmake,但我還需要安裝libqt4-dev,但我沒有安裝。

PS 正如一則評論中所建議的,我這麼做了

apt-rdepends --build-depends --follow=DEPENDS qt4-qmake
apt-rdepends --build-depends --follow=DEPENDS libqt4-dev

qt4-qmake 的清單並沒有顯示它需要 libqt4-dev,libqt4-dev 也沒有顯示它需要 qt4-qmake。

相關內容