Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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

After executing the following on Ubuntu 12.10 how do I set 4.8 to be the default C++ compiler?

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.8

When I check the version it says I have 4.6 by default. I'd like to change this to 4.8.

share|improve this question

closed as off-topic by slm, jasonwryan, rahmu, warl0ck, Michael Mrozek Nov 7 '13 at 4:05

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question has been posted on multiple sites. Cross-posting is strongly discouraged; see the help center and community FAQ for more information." – Michael Mrozek

sudo update-alternatives --config cc
sudo update-alternatives --config c++

Choose gcc 4.8 version in both cases.

share|improve this answer

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