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

This question already has an answer here:

How can I manually install gcc tarball file in Ubuntu 12.04?

share|improve this question

marked as duplicate by Eric Carvalho, Kevin Bowen, Luis Alvarado Aug 7 '13 at 18:25

This question was marked as an exact duplicate of an existing question.

You can install packages from source with apt-get:

sudo apt-get -y build-dep gcc
apt-get source gcc
cd gcc*
dpkg-buildpackage -rfakeroot
cd ..
sudo dpkg -i gcc*.deb
share|improve this answer

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