apt-get 更新,https 源已损坏

apt-get 更新,https 源已损坏

当我尝试运行时,apt-get update出现以下错误:

$ sudo apt-get update
/usr/lib/apt/methods/https: error while loading shared libraries: libnett▒d.sm.4: cannot open shared object file: No such file or directory
E: Method https has died unexpectedly!
E: Sub-process https returned an error code (127)
E: Method /usr/lib/apt/methods/https did not start correctly

当我禁用所有 HTTPS 源(docker、gitlab-runner)时,apt-get 运行正常并且我能够安装软件包。 Google 未能找到名为 的库libnett*d.sm.4

我在 RaspberryPi 3 上运行 raspbian:

$ cat /etc/*release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

我尝试过重新安装apt-transport-https

我还注意到:ping6效果不佳(同一个库)。当然,我已经尝试过禁用 IPv6。

更新

$ cat /etc/apt/sources.list
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi

$ cat /etc/apt/sources.list.d/*
deb [arch=armhf] https://apt.dockerproject.org/repo raspbian-jessie main


deb http://archive.raspberrypi.org/debian/ jessie main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
# deb-src http://archive.raspberrypi.org/debian/ jessie main ui


# this file was generated by packages.gitlab.com for
# the repository at https://packages.gitlab.com/runner/gitlab-ci-multi-runner
# deb https://packages.gitlab.com/runner/gitlab-ci-multi-runner/raspbian/ jessie main
# deb-src https://packages.gitlab.com/runner/gitlab-ci-multi-runner/raspbian/ jessie main

我完全禁用了源gitlab-runnerdocker在输出中处于活动状态 - 如果也注释该行,则apt-get update运行良好全部主动来源使用http

答案1

这看起来像是磁盘损坏;应该是在寻找libnettle.so.4

要解决这个特定问题,我怀疑您应该重新安装libcurl3-gnutls

apt-get --reinstall install libcurl3-gnutls

(作为root)。

但这可能不是罪魁祸首;要识别其他损坏的文件(至少是从软件包安装的文件),您可以使用debsums

debsums -c

(如有必要,安装后使用apt-get install debsums)。您应该重新安装由 标记的任何软件包debsums -c

联机debsums帮助页提供了这个方便的命令来重新安装受影响的软件包:

apt-get install --reinstall $(dpkg -S $(debsums -c) | cut -d : -f 1 | sort -u)

相关内容