Few months ago I was using gcc 4.6. In order to get C++11 functionality I upgraded to gcc 4.7 using a PPA. Today gcc 4.7 was recommended to me through the update manager. I just mindlessly clicked "Install all available updates".

Now when I try to build my project in C++, I get the following error:

enter image description here

The first thing that came to my mind was to uninstall gcc and install it again through the Synaptic Package Manager.

But something tells me that things may not be as straightforward as it seems. Compiler is an essential part of the OS and I am afraid I can lose the capacity to install anything. I remember that when I was upgrading to gcc 4.7 from gcc 4.6 things were also not so trivial.

Please, where can I find more information on the subject? Is it ok to just reinstall the gcc using Synaptic?


Debian packages (.deb, used also by Ubuntu) are packages consisting of compiled binaries (unless you want the source code package). This means that during installation, there is no need for a compiler - the necessary files are already compiled, they are just unpacked.

It should be safe to purge the offending gcc and install the version from the main repository, but there is no guarantee it will work without problems.

To help you get rid of the PPA from which you installed gcc4.7, take a look at PPA-Purge, which helps you with cleaning custom PPAs - it will automatically downgrade all packages to official version and remove the PPA from the system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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