0

我尝试了网络上的每个教程,但仍然没有...当我尝试:

sudo apt-get install build-essential 

我看到了这个:

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.

sudo aptitude .. 不起作用.. 任何 sudo apt-get -f .. 都不起作用...我将存储库添加到 source.list ,进行更新,但仍然没有...

4

3 回答 3

0

好的,请备份您当前的sources.list,删除原来的并尝试使用这个:

deb http://archive.ubuntu.com/ubuntu量子主受限 deb-src http://archive.ubuntu.com/ubuntu量子受限主多元宇宙#Added by software-properties deb http://archive.ubuntu.com /ubuntu量子宇宙

deb http://archive.ubuntu.com/ubuntu量子多元宇宙

deb http://archive.canonical.com/ubuntu量子合作伙伴 deb-src http://archive.canonical.com/ubuntu量子合作伙伴

deb http://extras.ubuntu.com/ubuntu量子主 deb-src http://extras.ubuntu.com/ubuntu量子主

deb http://security.ubuntu.com/ubuntu/量子安全受限的主多元宇宙

deb http://archive.ubuntu.com/ubuntu quantal-updates 限制了主多元宇宙

deb http://archive.ubuntu.com/ubuntu quantal-proposed 受限的主多元宇宙

deb http://archive.ubuntu.com/ubuntu quantal-backports 限制了主要的多元宇宙

然后执行“sudo apt-get update”并再次尝试安装。

于 2013-07-10T20:15:05.983 回答
0

这是一个明显的依赖问题,有几种解决方法,一种是安装 'aptitude' ,它会通过检查依赖树中所有可能的路径来解决您的问题,从而为您完成部分工作。在大多数情况下,apt-get 应该有可用的软件包版本并自行解决依赖关系,在这种情况下,只能通过将正确的存储库添加到 sources.list 来解决问题,我认为您需要更改存储库或者添加一些新的,有时从不同的 ubuntu 版本中添加一个会有所帮助。另一种选择(但不可取)是使用 apt-pinning,但最后一种对您来说应该足够了。

于 2013-07-10T18:13:26.520 回答
0

deb http://pl.archive.ubuntu.com/ubuntu/量子主受限宇宙多元宇宙 deb-src http://pl.archive.ubuntu.com/ubuntu/量子主受限宇宙多元宇宙 deb http://pl.archive .ubuntu.com/ubuntu/ quantal-updates 主要受限宇宙多元宇宙 deb-src http://pl.archive.ubuntu.com/ubuntu/ quantal-updates 主要受限宇宙多元宇宙 deb http://security.ubuntu.com/ubuntu量子安全主要受限宇宙多元宇宙 deb-src http://security.ubuntu.com/ubuntu量子安全主要受限宇宙多元宇宙 deb http://extras.ubuntu.com/ubuntu量子主要 deb-src http://extras .ubuntu.com/ubuntu量子主 deb http://pl.archive.ubuntu.com/ubuntu/ quantal-backports 主要受限宇宙多元宇宙 deb-src http://pl.archive.ubuntu.com/ubuntu/ quantal-backports 主要受限宇宙多元宇宙

这个存储库不起作用,我有同样的错误

于 2013-07-10T18:16:51.533 回答