我正在尝试升级gcc-4.8.1和克++-4.8.1到4.8.2。我添加了包含 g++-4.8.2 的 PPA,运行apt-get update
,然后当我尝试时:
martin@martin-Studio-1537:~$ sudo apt-get upgrade
[sudo] password for martin:
...
The following packages have been kept back:
cpp-4.8 g++-4.8 gcc-4.8 gcc-4.8-base libasan0 libatomic1 libgcc-4.8-dev
libgcc1 libgcc1-dbg libgfortran3 libgomp1 libitm1 libquadmath0
libstdc++-4.8-dev libstdc++6 libstdc++6-4.8-dbg
0 upgraded, 0 newly installed, 0 to remove and 16 not upgraded.
我需要升级的软件包被保留了下来。当我尝试:
martin@martin-Studio-1537:~$ sudo apt-get dist-upgrade
...
The following packages will be REMOVED:
g++-4.8 gcc-4.8
The following packages will be upgraded:
cpp-4.8 gcc-4.8-base libasan0 libatomic1 libgcc-4.8-dev libgcc1 libgcc1-dbg
libgfortran3 libgomp1 libitm1 libquadmath0 libstdc++-4.8-dev libstdc++6
libstdc++6-4.8-dbg
14 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
Need to get 14.9 MB of archives.
After this operation, 32.4 MB disk space will be freed.
系统想要删除 g++-4.8 gcc-4.8。
当我尝试安装时Synaptic 的 gcc-4.8它想要删除 g++-4.8当我告诉可以删除它时,出现此错误:
我如何安装gcc-4.8.2和克++-4.8.2?
编辑:
作为souravc 建议,我做到了
martin@martin-Studio-1537:~$ dpkg -l | grep "^rc" | awk '{print $2}'
结果如下:
autoconf
bcmwl-kernel-source
dkms
lib64gcc1
libbotan-1.10-0
libc6-amd64
libc6-x32
libpcrecpp0:i386
libqt5clucene5:i386
libqt5declarative5:i386
libqt5designer5:i386
libqt5designercomponents5:i386
libqt5help5:i386
libqt5quickparticles5:i386
libqt5quicktest5:i386
libqt5script5:i386
libsigsegv2:i386
libx32gcc1
libx32stdc++6
linux-image-3.11.0-12-generic
linux-image-3.11.0-15-generic
linux-image-extra-3.11.0-12-generic
linux-image-extra-3.11.0-15-generic
usb-creator-gtk
答案1
gcc 4.8.2 目前正在开发中并且仅针对 trusty(14.04LTS) 发布。
Ubuntu 13.10 saucy 当前可用的最新版本是 4.8.1,并且不会更新到 4.8.2
答案2
您收到此消息是因为您的系统中有损坏的软件包。为确保万无一失,请在您的终端中尝试此操作,
dpkg -l | grep "^rc" | awk '{print $2}'
您应该会得到一个显示上述包裹的列表。
在终端中运行以下命令来摆脱这个问题,
sudo apt-get autoremove
sudo apt-get autoclean
安装gcc-4.8
和g++-4.8
sudo apt-get update
sudo apt-get install gcc-4.8 g++-4.8