I want to install the newer 4.8 version of gcc, and when I searched for a solution i found this. But when trying to use the solution I ran into a quite annoying problem:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
work like a charm (or at least they don't complain)
sudo apt-get install gcc-4.8
results in (sorry for the german, but maybe the format of the message triggers some memories, therefore I did not just post my translation):
Einige Pakete konnten nicht installiert werden. Das kann bedeuten, dass Sie eine unmögliche Situation angefordert haben oder, wenn Sie die Unstable-Distribution verwenden, dass einige erforderliche Pakete noch nicht erstellt wurden oder Incoming noch nicht verlassen haben. Die folgenden Informationen helfen Ihnen vielleicht, die Situation zu lösen:
Die folgenden Pakete haben unerfüllte Abhängigkeiten:
gcc-4.8:i386 : Hängt ab von: cpp-4.8:i386 (= 4.8.1-2ubuntu1~12.10.3) soll aber nicht installiert werden Hängt ab von: binutils:i386 (>= 2.22) soll aber nicht installiert werden Hängt ab von: libgcc-4.8-dev:i386 (= 4.8.1-2ubuntu1~12.10.3) soll aber nicht installiert werden Hängt ab von: libc6:i386 (>= 2.11) soll aber nicht installiert werden Hängt ab von: libcloog-isl4:i386 (>= 0.17) soll aber nicht installiert werden Hängt ab von: libgmp10:i386 soll aber nicht installiert werden Hängt ab von: libisl10:i386 (>= 0.10) soll aber nicht installiert werden Hängt ab von: libmpc2:i386 soll aber nicht installiert werden Hängt ab von: libmpfr4:i386 (>= 3.1.0) soll aber nicht installiert werden Hängt ab von: zlib1g:i386 (>= 1:1.1.4) soll aber nicht installiert werden Empfiehlt: libc6-dev:i386 (>= 2.13-0ubuntu6) soll aber nicht installiert werden
E: Probleme können nicht korrigiert werden, Sie haben zurückgehaltene defekte Pakete.
Which is basically saying (giving: a rough translation):
There are some packages which cannot be installed. Meaing, that there is a situation where you are using a unstable distribution therefore some packages are not made or did not leave incoming yet. The following information may help you to find a solution
The following pacakges have unresolved dependencies:
gcc-4.8:i386 : depends on: cpp-4.8:i386 (= 4.8.1-2ubuntu1~12.10.3) shall/may not be installed ...and so on, as the text is the same i hope i do not have to copy paste it
E: Occuring Problem could not be managed, you got reserved damaged packets.
Further information on my System:
uname -a
Linux name 3.5.0-28-generic #48-Ubuntu SMP Tue Apr 23 23:03:38 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.10
DISTRIB_CODENAME=quantal
DISTRIB_DESCRIPTION="Ubuntu 12.10"
apt-get update
have you done anapt-get upgrade
a/oapt-get dist-upgrade
to get your installed packages to their current versions? Also, the output you show suggests you are installing the i386 version, whereas your question states that you are looking for the 64-bit version. – zwets Oct 30 '13 at 21:22apt-get upgrade
but this changed nothing. In answer to you i386 question. I am not sure why this is the package chosen to install. But when looking in the listing of synaptic-manage the only 4.8 versions of gcc listed (and apparently installed) are of i386. The general gcc package though is supposed to be 4.7. By "apparently installed" I mean that there is a green dot in fromt of that package. The shell output does not differ though. – Sim Oct 30 '13 at 22:14