5

I am reading an article on raspberry pi on a local magazine and they do this

sudo apr-get install gcc-4.8 g++-4.8
sudo rm -rf /usr/bin/gcc
sudo rm -rf /usr/bin/g++
sudo ln -s /usr/bin/gcc-4.8 /usr/bin/gcc
sudo ln -s /usr/bin/g++-4.8 /usr/bin/g++

I understand that here they are replacing the default gcc and g++ with a recently installed 4.8 version

What version of gcc does the raspberry pi 2 and 3 come with originally?

(The above commands are not required on a rasp pi 1 or zero-- wonder why?)

asked Aug 30, 2017 at 0:46
3
  • my pi's have gcc/g++ 6.3 (and also gcc 4.9) - so, not sure what to say Commented Aug 30, 2017 at 3:10
  • In raspberrypi.stackexchange.com/questions/12325/… something like this was recommended Commented Aug 30, 2017 at 3:42
  • 3 year old question - 4.8 (or later it seems) is standard version, even in wheezy Commented Aug 30, 2017 at 3:43

3 Answers 3

3

Strictly speaking, Raspberry Pi comes with no software. The gcc version will depend on which distribution of Linux (or other OS) you take and exactly when you take it. Most Linux distribution images periodically update to new versions.

That being said, my Pi running up-to-date Raspian has version

 gcc (Raspian 4.9.2-10) 4.9.2

as of this moment (Aug 30, 2017).

answered Aug 30, 2017 at 11:51
3

The default version of the GCC are as follows:

  • Raspbian Stretch: GCC 6.3.0
  • Raspbian Jessie: GCC 4.9.2 (GCC 4.8.4 available)
  • Raspbian Wheezy: GCC 4.6.3 (GCC 4.4.7 and 4.7.2 available)

g++ always gets the same version number as GCC, since it is part of the same software project.

answered Mar 15, 2018 at 16:38
0

Dowload the file from here: http://archive.raspbian.org/raspbian/dists/stretch/main/binary-armhf/Packages

and run cat Packages | grep "Package: gcc*"

You should see:

Package: gcc-6

answered Mar 15, 2018 at 15:53

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.