You can do this with apt's "preferences" functionality (man apt_preferences
).
To add wheezy as a source of packages without installing anything from wheezy by default, add entries for wheezy to your sources.list
, and add the following to /etc/apt/preferences
(or to a file in preferences.d
):
Package: *
Pin: release n=wheezy
Pin-Priority: 50
Once that is set up, you can install libqt4-dev with the following command:
apt-get install -t wheezy libqt4-dev
This will also install the dependencies of libqt4-dev, which may be numerous. Not being familiar with qt, I'm not sure whether the pinning solution here is the best way to get the newer version of qt onto a squeeze system. Another possibility is the backports repository, but I don't see qt4 in there. A third possibility is to build your own backported version using apt-get -b source
.