Skip to content

Instantly share code, notes, and snippets.

@ibogun
Last active February 2, 2021 13:26
Show Gist options
  • Select an option

  • Save ibogun/ec0a4005c25df57a1b9d to your computer and use it in GitHub Desktop.

Select an option

Save ibogun/ec0a4005c25df57a1b9d to your computer and use it in GitHub Desktop.
Installing gcc 4.9 & g++ 4.9 on Ubuntu 12.04 OR Ubuntu 14.04
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 50
sudo apt-get install g++-4.9
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 50
@scalaview
Copy link
Copy Markdown

+1

@santiihoyos
Copy link
Copy Markdown

+1

@hryniuk
Copy link
Copy Markdown

hryniuk commented May 25, 2016

๐Ÿ‘

@IceDcap
Copy link
Copy Markdown

IceDcap commented Jul 25, 2016

doushuqi@singuloid:~$ sudo apt-get install gcc-4.9 g++-4.9
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
g++-4.9 : Depends: libstdc++-4.9-dev (= 4.9.3-8ubuntu214.04) but it is not going to be installed
gcc-4.9 : Depends: libgcc-4.9-dev (= 4.9.3-8ubuntu2
14.04) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

@tompizmor
Copy link
Copy Markdown

+1

@dausruddin
Copy link
Copy Markdown

+1

@leolovenet
Copy link
Copy Markdown

+1

@rcornall
Copy link
Copy Markdown

rcornall commented Dec 5, 2016

+1

@NenadPetkovic
Copy link
Copy Markdown

+1

@biljkus
Copy link
Copy Markdown

biljkus commented Mar 9, 2017

+1

@vmiheer
Copy link
Copy Markdown

vmiheer commented Apr 5, 2017

๐Ÿ‘

@Jayhello
Copy link
Copy Markdown

Jayhello commented May 3, 2017

+1

@DevipriyaSarkar
Copy link
Copy Markdown

Hey, just a suggestion, to avoid sudo: add-apt-repository: command not found
the first line could be updated to sudo apt-get install software-properties-common python-software-properties as in https://gist.github.com/DevipriyaSarkar/5b67f39eaead3209809aca80c6fd53a7
Thanks ๐Ÿ‘

@rraallvv
Copy link
Copy Markdown

Unattended installation, anyone?

@tkmn0
Copy link
Copy Markdown

tkmn0 commented Mar 17, 2018

+1

@tatomy
Copy link
Copy Markdown

tatomy commented May 11, 2018

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment