1

I tried downoading 4.8 for 12.04 from https://launchpad.net/~ubuntu-toolchain-r/+archive/test/+packages (I did not find for 13.04 as is mentioned here: How to install gcc-4.8) and I think I messed up trying to install it.

apt-get install gcc-4.8 gives :

The following packages have unmet dependencies:

followed by a long list of packages and the recommendation:

E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution) 

but apt-get -f install says

E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

Please help I need it for the C++11 support

Update 04/28/2013

This was fixed with

sudo apt-get clean

followed by

sudo apt-get update 

then

apt-get upgrade -f 

Many thanks to everyone for trying to help!

3 Answers3

3

The best way to install gcc with C++11 support is to do

sudo apt-get install build-essential

and then compile the source code with

g++ <Filename>.cpp -std=c++0x
Seth
  • 59,332
thefourtheye
  • 4,922
  • 2
  • 26
  • 32
1

You can install gcc 4.8 in Ubuntu 13.04, just follow the commands

 sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
 sudo apt-get update
 sudo apt-get install gcc-4.8-base

Source How to install gcc-4.8

enter image description here

Qasim
  • 22,162
1

install two debian packages...(you can search Google to download and install it)

64-bit

libisl10_0.11.1-2_amd64.deb

libcloog-isl4_0.18.0-2_amd64.deb

command: sudo dpkg -i 'package_name'

sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y

sudo apt-get update

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