TL;DR: Based on what you already do have installed, just install pkg-config and you should be good to go.
Building the kernel uses Qt if you want to configure what goes into your kernel by running
make xconfig. (Which you likely do, as this is one of the friendliest ways to do it.)
At least for any remotely recent kernel, you can use Qt 4 instead of Qt 3. You should install:
- libqt4-dev , so the xconfig utility can link against Qt4, and
- pkg-config , so
make xconfig can automatically discover the Qt4 headers installed by
libqt4-dev and use them.
You can install those packages through the Software Center or with:
sudo apt-get update
sudo apt-get install libqt4-dev pkg-config
(For more information on
make xconfig, see this answer to What's a simple way to recompile the kernel?.)
You don't need both Qt3 and Qt4 headers: provided either is installed correctly and the system is configured so they'll be identified by
make xconfig (pkg-config is one way to faciliate this), you don't need the other.
By the way, though there's no harm in doing so, it's not actually necessary to explicitly install
libqt4-dev declares the other necessary Qt4-related packages, such as
qt4-qmake, as dependencies, causing them to be automatically installed as well. You also only need the
ncurses packages if you're going to run
make menuconfig (which is a non-graphical alternative to
In your case, you already have libqt4-dev installed, so you can just install pkg-config .