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
    • 最新
    • 标签
主页 / computer / 问题 / 1418721
Accepted
Malspherus
Malspherus
Asked: 2019-03-29 08:49:27 +0800 CST2019-03-29 08:49:27 +0800 CST 2019-03-29 08:49:27 +0800 CST

调用 '/usr/lib/apt/methods/http' 时 openhabian 上的 apt-get 错误

  • 772

我希望我就在这里,几天前 apt-get 打破了我的 Raspberry Pi Model B rev。2(运行 Openhabian)。我不确定为什么还无法自己修复它。

当我尝试以apt-get updateroot 身份运行时,我得到以下输出:

[15:58:05] root@openHABianPi:/home/openhabian# apt-get update
Reading package lists... Done
E: Method http has died unexpectedly!
E: Sub-process http received signal 4.
E: Method /usr/lib/apt/methods/http did not start correctly
E: Method https has died unexpectedly!
E: Sub-process https received signal 4.
E: Method /usr/lib/apt/methods/https did not start correctly
E: Method https has died unexpectedly!
E: Sub-process https received signal 4.
E: Method /usr/lib/apt/methods/https did not start correctly
E: Method https has died unexpectedly!
E: Sub-process https received signal 4.
E: Method /usr/lib/apt/methods/https did not start correctly
E: Method https has died unexpectedly!
E: Sub-process https received signal 4.
E: Method /usr/lib/apt/methods/https did not start correctly
E: Method http has died unexpectedly!
E: Sub-process http received signal 4.
E: Method /usr/lib/apt/methods/http did not start correctly
E: Method http has died unexpectedly!
E: Sub-process http received signal 4.
E: Method /usr/lib/apt/methods/http did not start correctly
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/dists/stretch/InRelease
E: Failed to fetch https://apt.homegear.eu/Raspbian/stretch/InRelease
E: Failed to fetch https://deb.debian.org/debian/dists/stretch-backports/InRelease
E: Failed to fetch https://mirrordirector.raspbian.org/raspbian/dists/testing/InRelease
E: Failed to fetch https://dl.bintray.com/openhab/apt-repo2/dists/stable/InRelease
E: Failed to fetch http://archive.raspberrypi.org/debian/dists/stretch/InRelease
E: Failed to fetch http://repos.azulsystems.com/debian/dists/stable/InRelease
E: Some index files failed to download. They have been ignored, or old ones used instead.

当我尝试检查/usr/lib/apt/methods/http(https 是指向它的链接)的版本时,我得到以下输出:

[15:59:05] root@openHABianPi:/home/openhabian# /usr/lib/apt/methods/http
Illegal instruction

我已经apt-transport-https安装了。我也这样做apt-get autoremove了,无论包是什么,都可能缺少一些依赖性/usr/lib/apt/methods/http,据我所知,这甚至是不应该发生的。

谢谢您的帮助!

编辑 1:

[23:11:36] root@openHABianPi:/home/openhabian# dpkg -i apt_1.4.9_armhf.deb
dpkg: warning: downgrading apt from 1.8.0 to 1.4.9
(Reading database ... 47399 files and directories currently installed.)
Preparing to unpack apt_1.4.9_armhf.deb ...
Unpacking apt (1.4.9) over (1.8.0) ...
dpkg: dependency problems prevent configuration of apt:
 libapt-pkg5.0:armhf (1.8.0) breaks apt (<< 1.6~) and is installed.
  Version of apt to be configured is 1.4.9.

dpkg: error processing package apt (--install):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.28-8) ...
Processing triggers for man-db (2.7.6.1-2) ...
Errors were encountered while processing:
 apt

我安装了libapt-pkg5.0_1.4.9_armhf.deb然后能够安装apt_1.4.9_armhf.deb

我仍然遇到 apt-get update0% [Working]在一个来源冻结的问题,这仍然可能是由不兼容的来源引起的。

编辑 2:
问题是由来自 letsencrypt/certbot-setup 的错误源引起的,我通过删除源、将我的包固定到稳定(对很多包使用“现在”)和基本上通过apt-get dist-upgrade大量手动检查非常小心。即使安装了 apt-transport-https,您也可能不得不暂时排除 https 源,因为它对我也不起作用(/usr/lib/apt/methods/https由于依赖关系,调用时出现“非法指令”失败)。

apt
  • 1 1 个回答
  • 2210 Views

1 个回答

  • Voted
  1. Best Answer
    Xen2050
    2019-03-29T09:48:17+08:002019-03-29T09:48:17+08:00

    我希望你dpkg仍然可以正常工作......在我的 Debian/MX 系统(也基于 Debian stretch)上,该/usr/lib/apt/methods/http文件是apt包的一部分,用dpkg -S /usr/lib/apt/methods/http.

    浏览可能是您的主要存储库的内容http://raspbian.raspberrypi.org/raspbian/dists/stretch/InRelease并专门查看http://raspbian.raspberrypi.org/raspbian/dists/stretch/main/binary-armhf /Packages(它是 59M)我看到它有

    Package: apt
    Version: 1.4.9
    

    这也与我的版本号相同。所以我猜你的apt包裹不知何故搞砸了,也许来自另一个来源的不兼容版本“升级”了它?您可以使用以下方法之一检查您的 apt 版本:

    • apt-cache showpkg apt
    • apt-cache show apt如果 apt-cache 仍然有效,或者
    • dpkg -s apt
    • dpkg-query --show apt

    希望它不是 1.4.9,所以你可以尝试安装这个版本。通过存储库浏览更多内容, http: //raspbian.raspberrypi.org/raspbian/pool/main/a/apt/有apt_1.4.9_armhf.deb文件。

    [它的镜像列表在这里,还有其他下载链接。]

    如果您下载 .deb。文件,并安装它

    dpkg -i apt_1.4.9_armhf.deb
    

    那应该安装一个希望好的版本的apt。

    小心不要再次“升级”apt 到一个可能损坏的版本,我会检查任何候选人的来源apt-cache policy apt并可能删除“坏”来源,或者考虑apt只固定到一个好的来源(参见 参考资料man apt_preferences)或锁定它的版本。

    • 0

相关问题

Sidebar

Stats

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

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    Windows 10 服务称为 AarSvc_70f961。它是什么,我该如何禁用它?

    • 2 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Marko Smith

    ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败:无法获取本地颁发者证书 (_ssl.c:1056)

    • 4 个回答
  • Marko Smith

    我如何知道 Windows 安装在哪个驱动器上?

    • 6 个回答
  • Martin Hope
    Albin 支持结束后如何激活 WindowsXP? 2019-11-18 03:50:17 +0800 CST
  • Martin Hope
    fixer1234 “HTTPS Everywhere”仍然相关吗? 2019-10-27 18:06:25 +0800 CST
  • Martin Hope
    Kagaratsch Windows 10 删除大量小文件的速度非常慢。有什么办法可以加快速度吗? 2019-09-23 06:05:43 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    Inter Sys Ctrl+C 和 Ctrl+V 是如何工作的? 2019-05-15 02:51:21 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve