Saturday, June 21, 2014

Install gcc/g++ 4.7 on Raspberry Pi and set as default

Install gcc-4.7 g++-4.7 on Raspberry Pi, enter the commands:

$ sudo apt-get install gcc-4.7 g++-4.7
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7

Then run the the command and select gcc-4.7.
$ sudo update-alternatives --config gcc

1 comment:

Unknown said...

Thanks for the tutorial!

Clear and told me exactly what I need to do to get the latest G++ on my Pi.