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 / 问题 / 739391
Accepted
Mausy5043
Mausy5043
Asked: 2015-11-28 10:48:51 +0800 CST2015-11-28 10:48:51 +0800 CST 2015-11-28 10:48:51 +0800 CST

apt-get upgrade 中止了如何恢复?(哈希和不匹配)

  • 772

我在StackOverflow上问过,但被重定向到这里。

恐怕我制造了一种嘘声。

在执行apt-get upgrade(队列中大约有 160 多个包)时,我不小心注销了,因此中途中止了升级。现在我无法重新开始升级。

apt-get upgrade说没有要升级的包...

apt-get update给出错误:

W: Failed to fetch http://security.debian.org/dists/wheezy/updates/main/binary-armel/Packages  Hash Sum mismatch

W: Failed to fetch http://security.debian.org/dists/wheezy/updates/contrib/binary-armel/Packages  Hash Sum mismatch

W: Failed to fetch http://security.debian.org/dists/wheezy/updates/non-free/binary-armel/Packages  Hash Sum mismatch

[several more of these... and ending in: ]
E: Some index files failed to download. They have been ignored, or old ones used instead.
E: Couldn't rebuild package cache

完整的输出在 pastebin 上

我尝试了这些但没有成功:

  • apt-get -f install

输出:

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  • dpkg --configure -a

无输出

  • rm -vf /var/lib/apt/lists/*; rm -vf /var/lib/apt/lists/partial/*; apt-get update

与上述相同的错误。

  • dpkg-reconfigure -a

在此之后最终中止:

[ ok ] Stopping acpid (via systemctl): acpid.service.
[ ok ] Starting acpid (via systemctl): acpid.service.
[ ok ] Stopping apache2 (via systemctl): apache2.service.
[ ok ] Starting apache2 (via systemctl): apache2.service.
gpg: key B98321F9: "Squeeze Stable Release Key <[email protected]>" not changed
gpg: key 473041FA: "Debian Archive Automatic Signing Key (6.0/squeeze) <[email protected]>" not changed
gpg: key 65FFB764: "Wheezy Stable Release Key <[email protected]>" not changed
gpg: key 46925553: "Debian Archive Automatic Signing Key (7.0/wheezy) <[email protected]>" not changed
gpg: key 518E17E1: "Jessie Stable Release Key <[email protected]>" not changed
gpg: key 2B90D010: "Debian Archive Automatic Signing Key (8/jessie) <[email protected]>" not changed
gpg: key C857C906: "Debian Security Archive Automatic Signing Key (8/jessie) <[email protected]>" not changed
gpg: Total number processed: 7
gpg:              unchanged: 7
[ ok ] Stopping avahi-daemon (via systemctl): avahi-daemon.service.
[ ok ] Reloading dbus configuration (via systemctl): dbus.service.
[ ok ] Starting avahi-daemon (via systemctl): avahi-daemon.service.
update-alternatives: using /usr/share/man/man7/bash-builtins.7.gz to provide /usr/share/man/man7/builtins.7.gz (builtins.7.gz) in auto mode
update-initramfs: deferring update (trigger activated)
[ ok ] Starting loadcpufreq (via systemctl): loadcpufreq.service.
[ ok ] Starting cpufrequtils (via systemctl): cpufrequtils.service.
[ ok ] Stopping cron (via systemctl): cron.service.
[ ok ] Starting cron (via systemctl): cron.service.
[ ok ] Starting dbus (via systemctl): dbus.service.
update-initramfs: deferring update (trigger activated)
update-initramfs: deferring update (trigger activated)
update-initramfs: deferring update (trigger activated)
Regenerating fonts cache... done.
udev active, skipping device node creation.
update-initramfs: deferring update (trigger activated)
dpkg-query: error: --status needs a valid package name but 'gcc-4.7-base' is not: ambiguous package name 'gcc-4.7-base' with more than one installed instance

Use --help for help about querying packages.
/usr/sbin/dpkg-reconfigure: gcc-4.7-base is not installed

我不知道如何找出已安装的内容和未安装的内容。

非常欢迎任何关于如何从中恢复的提示!

debian
  • 1 1 个回答
  • 788 Views

1 个回答

  • Voted
  1. Best Answer
    aseq
    2015-11-28T19:19:42+08:002015-11-28T19:19:42+08:00

    这可能应该转移到超级用户或类似用户,但既然你已经被重定向了......

    首先,我建议在屏幕会话中运行这些东西。当您注销或连接中断时,这将使更新继续进行:

    screen -S upd
    

    要分离会话,请按CTRL a然后按d

    要重新附加会话类型:

    screen -r upd
    

    粘贴您列出但尝试但未成功的内容的输出也会很有帮助。

    一些建议:

    • 您是否尝试切换存储库
    • 你递归删除/var/lib/apt/lists/*
    • 你mkdir /var/lib/apt/lists/partial

    我的建议来自: https ://askubuntu.com/questions/41605/trouble-downloading-packages-list-due-to-a-hash-sum-mismatch-error/

    编辑:从您添加的信息来看,您可能需要强制删除gcc-4.7-base,然后重新安装并重复dpkg-reconfigure -a。如果另一个包失败,重复此过程直到成功,然后重新运行 apt-get (dist-)upgrade。

    • 1

相关问题

  • 关闭 FTP

  • 如何在同一台电脑上从 putty 连接 debian vmware

  • debian- 文件到包的映射

  • Debian Ubuntu 网络管理器错误 [关闭]

  • 为本地网络中的名称解析添加自定义 dns 条目

Sidebar

Stats

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

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

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

    • 9 个回答
  • Marko Smith

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

    • 3 个回答
  • Marko Smith

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

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +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