Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have manually installed gcc/g++ 4.7 on my Ubuntu 12.04

When I run sudo apt-get install dpkg-dev it's trying to download and install g++ 4.6 which would obviously break 4.7.

How can I install dpkg-dev without installing gcc 4.6 ?

share|improve this question

You could use a PPA. One containing gcc/g++ 4.7 can be found here. The first link shows a graphical method of installing a PPA. Alternatively, via terminal:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.7

Using a PPA to install gcc/g++ might allow apt-get to realise that gcc/g++ 4.7 satisfies the dependency.

share|improve this answer

Looks like apt-mark hold is what I need.

If somebody knows more elegant method please let me know.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.