AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 48358
Accepted
ehsanul
ehsanul
Asked: 2009-07-31 16:09:48 +0800 CST2009-07-31 16:09:48 +0800 CST 2009-07-31 16:09:48 +0800 CST

在 Ubuntu 8.04 上安装 build-essential 和升级 g++ 时出现问题

  • 772

我似乎在依赖方面遇到了一些麻烦,但我自己并不真正知道如何解决这个问题。这是输出:

~:) 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.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  build-essential: Depends: g++ (>= 4:4.3.1) but 4:4.2.3-1ubuntu6 is to be installed
E: Broken packages
~:) sudo apt-get install g++
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.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  g++: Depends: cpp (>= 4:4.3.1-1ubuntu2) but 4:4.2.3-1ubuntu6 is to be installed
       Depends: gcc (>= 4:4.3.1-1ubuntu2) but 4:4.2.3-1ubuntu6 is to be installed
       Depends: g++-4.3 (>= 4.3.1-1) but it is not going to be installed
       Depends: gcc-4.3 (>= 4.3.1-1) but it is not installable
E: Broken packages
~:) 

编辑:我只是按照建议尝试了 aptitude 而不是 apt-get。不行,还有其他问题:

~:) sudo aptitude install build-essential
[sudo] password for ehsanul: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
Building tag database... Done      
The following packages are BROKEN:
  g++ g++-4.3 libstdc++6-4.3-dev 
The following packages have been automatically kept back:
  dpkg-dev fakeroot libdns35 libisc35 linux-libc-dev patch 
The following NEW packages will be automatically installed:
  libgmp3c2 libmpfr1ldbl 
The following packages have been kept back:
  adobe-flashplugin bind9-host dnsutils gvfs gvfs-backends gvfs-fuse 
  libatm1 libbind9-30 libgvfscommon0 libisccc30 libisccfg30 liblwres30 
  libnautilus-extension1 linux-headers-2.6.24-24 
  linux-headers-2.6.24-24-generic linux-image-2.6.24-24-generic nautilus 
  nautilus-data 
The following NEW packages will be installed:
  libgmp3c2 libmpfr1ldbl 
The following packages will be upgraded:
  build-essential 
The following partially installed packages will be configured:
  timidity 
2 packages upgraded, 4 newly installed, 0 to remove and 24 not upgraded.
Need to get 775kB/6265kB of archives. After unpacking 20.3MB will be used.
The following packages have unmet dependencies:
  libstdc++6-4.3-dev: Depends: gcc-4.3-base (= 4.3.2-1ubuntu11) which is a virtual package.
                      Depends: libstdc++6 (>= 4.3.2-1ubuntu11) but 4.2.4-1ubuntu4 is installed.
  g++-4.3: Depends: gcc-4.3-base (= 4.3.2-1ubuntu11) which is a virtual package.
           Depends: gcc-4.3 (= 4.3.2-1ubuntu11) which is a virtual package.
           Depends: libc6 (>= 2.8~20080505) but 2.7-10ubuntu4 is installed.
  g++: Depends: cpp (>= 4:4.3.1-1ubuntu2) but 4:4.2.3-1ubuntu6 is installed.
       Depends: gcc (>= 4:4.3.1-1ubuntu2) but 4:4.2.3-1ubuntu6 is installed.
       Depends: gcc-4.3 (>= 4.3.1-1) which is a virtual package.
Resolving dependencies...
The following actions will resolve these dependencies:

Keep the following packages at their current version:
build-essential [11.3ubuntu1 (hardy, now)]
g++ [4:4.2.3-1ubuntu6 (hardy-updates, now)]
g++-4.3 [Not Installed]
libstdc++6-4.3-dev [Not Installed]

Score is -9852

Accept this solution? [Y/n/q/?] 
ubuntu installation dependencies
  • 5 5 个回答
  • 17380 Views

5 个回答

  • Voted
  1. faultyserver
    2009-07-31T16:22:28+08:002009-07-31T16:22:28+08:00

    尝试使用 aptitude 代替,它在处理包依赖项时会更聪明一些。

    sudo aptitude update && aptitude install build-essential
    

    更新

    我做了一些谷歌搜索,发现上述解决方案至少适用于遇到同样问题的其他人。(见线程底部)

    链接:http ://ubuntuforums.org/showthread.php?t=940314

    • 6
  2. Best Answer
    LiraNuna
    2009-08-02T02:01:13+08:002009-08-02T02:01:13+08:00

    对我来说,看起来像是搞砸了存储库。Ubuntu 8.04 LTS 没有GCC 4.3.x,只有 4.2.x,并且没有被反向移植。尝试检查 /etc/apt/sources.list 以找到任何不耐用的存储库。

    • 3
  3. Schof
    2009-08-06T15:46:32+08:002009-08-06T15:46:32+08:00

    我支持 /etc/apt/sources.list 建议。可以发你的吗?我的第一个猜测是那里有什么东西坏了。

    • 1
  4. simoncpu
    2013-06-29T01:10:14+08:002013-06-29T01:10:14+08:00

    也有这个问题。我发现我搞砸了我的 /etc/apt/sources.list 和 /etc/apt/preferences。修复这些文件就可以了。

    • 1
  5. Rik Schneider
    2009-08-01T19:43:04+08:002009-08-01T19:43:04+08:00

    我不再运行任何 8.04 机器,但看起来你需要安装 gcc-4.3 才能让你继续。您是否从“apt-cache search gcc-4.3”或“sudo apt-get install gcc-4.3”得到任何结果?

    您的 /etc/apt/sources.list 和 /etc/apt/sources.list.d/* 文件包含什么?你有宇宙或多元宇宙以及主要列出的吗?您是否也启用了 backports repo?

    快速浏览一些 Package.gz 文件,我没有看到 gcc-4.3 的任何内容,但我并没有看得太远,因为我不知道您正在使用哪些 repos 和 dists。

    祝你好运

    • 0

相关问题

  • 如何在 Ubuntu 上设置简单的防火墙?

  • 设置没有密码的用户

  • 在 Ubuntu 上设置电子邮件服务器

  • 保护新的 Ubuntu 服务器 [关闭]

  • (软)Ubuntu 7.10 上的 RAID 6,我应该迁移到 8.10 吗?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    从 IP 地址解析主机名

    • 8 个回答
  • Marko Smith

    如何按大小对 du -h 输出进行排序

    • 30 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    Windows 中执行反向 DNS 查找的命令行实用程序是什么?

    • 14 个回答
  • Marko Smith

    如何检查 Windows 机器上的端口是否被阻塞?

    • 4 个回答
  • Marko Smith

    我应该打开哪个端口以允许远程桌面?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    MikeN 在 Nginx 中,如何在维护子域的同时将所有 http 请求重写为 https? 2009-09-22 06:04:43 +0800 CST
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    0x89 bash中的双方括号和单方括号有什么区别? 2009-08-10 13:11:51 +0800 CST
  • Martin Hope
    kch 如何更改我的私钥密码? 2009-08-06 21:37:57 +0800 CST
  • Martin Hope
    Kyle Brandt IPv4 子网如何工作? 2009-08-05 06:05:31 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve