升级到Ubuntu 14.10后无法运行g ++

罗曼

我昨天做了从Ubuntu 14.04到Ubuntu 14.10的更新。今天,我尝试像往常一样运行g ++-4.8,但是出现以下错误:

make: g++-4.8: Command not found

我对g ++-4.9g ++有相同的错误我尝试再次安装g ++:

sudo apt-get install g++

但是我有以下错误信息:

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++ : Depends: g++-4.9 (>= 4.6.4-1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

然后我尝试了dist-upgrade

sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  libc6 libc6:i386 libc6-dbg valgrind
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

安装-f

sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

但它并没有改变任何东西。我清除了gcc和build-essential。但是,当我尝试重新安装build-essential时,我遇到了相同的错误:

sudo apt-get install build-essential
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:
 build-essential : Depends: libc6-dev but it is not going to be installed or
                            libc-dev
                   Depends: g++ (>= 4:4.4.3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

编辑:我看了这个答案,但删除包libc6失败:

romain@romain-N56VZ:~$ sudo apt-get remove --dry-run libc6
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:
 hunspell-fr : Depends: hunspell-fr-classical but it is not going to be installed or
                        hunspell-fr-modern but it is not going to be installed or
                        hunspell-fr-revised but it is not going to be installed or
                        hunspell-fr-comprehensive but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
罗曼

好的,我修复了它:

我从valgrind开始删除了导致错误的软件包:

sudo apt-get remove valgrind

然后是其他3个 之后,再也没有错误。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章