I am trying to install gcc4.9 and g++4.9 on my raspberry pi jessie.

I am following this tutorial, however when it comes to running:

sudo apt-get install gcc-4.9 g++4.9

I get:

Reading Package Lists..Done
Building dependency tree
Reading state information.. Done
E: Unable to locate package g++4.9
E: Couldn't find any package by regex 'g++4.9'

My sources.list is as follows:

deb http://mirrordirector.raspbian.org/raspbian jessie main contrib non-free
deb-src http://archive.raspbian.org/raspbian jessie main contrib non-free

I get the feeling I just need to another source in this list to be able to install it. But how can I find a source that hosts it, and is compatible with my Raspberry Pi Jessie?


You made a mistake in your command. It should be:

sudo apt-get install gcc-4.9 g++-4.9

  • Sorry, I made a mistake. I just typed it fast in here. That is the command I was running. – Chud37 May 19 '16 at 8:45
  • If you use Raspbian jessie you should have already installed gcc in version 4.9. To check this type: gcc -v – Huczu May 19 '16 at 8:49
  • Oh! If it's already installed how come it's not in the repo? – Chud37 May 19 '16 at 8:56
  • 1
    It is. You are just making mistakes. it's gcc-4.9 and g++-4.9. – Huczu May 19 '16 at 8:57

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.