libc-bin 半配置,无法运行 apt -f install 来修复/安装软件包,无法配置 libc-bin,因为它依赖于 libc-bin

libc-bin 半配置,无法运行 apt -f install 来修复/安装软件包,无法配置 libc-bin,因为它依赖于 libc-bin

我有一台 Netgear ReadyNAS 机器,它内部运行 Debian Jessie 的修改版本。我主要将其用作服务器,并在其上运行一些 Docker 容器。我无法在不完全破坏 NAS 的情况下升级到 Jessie 或安装不同的操作系统(除非我错过了某些东西)。我仅仅通过 SSH 以 root 身份就使我的 Netgear 保修失效,但肯定不会出现任何问题,对吧?

apt upgrade嗯...几周前我在运行时犯了一个错误,停电后我注意到我的 NAS 没有响应 SSH。在谷歌上搜索了一下后,我设法将其重新启动到 Netgear 的内部技术支持模式,以便我可以远程登录,并且我注意到在尝试启动 Netgear 的服务时机器停止运行:

Dec 24 01:52:38 Nile-Nellie systemd[1]: Starting ReadyNAS System Daemon...
Dec 24 01:52:38 Nile-Nellie readynasd[3647]: /usr/sbin/readynasd: error while loading shared libraries: libcom_err.so.2:
 cannot open shared object file: No such file or directory
Dec 24 01:52:38 Nile-Nellie systemd[1]: readynasd.service: Main process exited, code=exited, status=127/n/a
Dec 24 01:52:38 Nile-Nellie systemd[1]: Failed to start ReadyNAS System Daemon.
Dec 24 01:52:38 Nile-Nellie systemd[1]: readynasd.service: Unit entered failed state.
Dec 24 01:52:38 Nile-Nellie systemd[1]: readynasd.service: Failed with result 'exit-code'.

嗯——当然,这都是一些专有的东西,但我觉得无法访问libcom_err.so.2是很糟糕的。所以我去重新安装软件包,我注意到尝试运行 apt 给了我这个:

# apt install libcomerr2
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libcom-err2 : Breaks: libcomerr2 (< 1.43.9-1~)
 libpython2.7-stdlib : Depends: libpython2.7-minimal (= 2.7.9-2+deb8u5) but it is not going to be installed
 libvorbisenc2 : Depends: libvorbis0a (= 1.3.4-2+deb8u3) but 1.3.4-2+deb8u1 is to be installed
 mysql-community-client : Depends: libaio1 (>= 0.3.93) but it is not going to be installed
 mysql-community-server : Depends: libaio1 (>= 0.3.93) but it is not going to be installed
 python : Depends: python2.7 (>= 2.7.9-1~) but it is not going to be installed
 python-mako : Depends: python2.7:any
 python-minimal : Depends: python2.7-minimal (>= 2.7.9-1~) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

好吧,很简单——运行apt-get -f install

# apt -f install
Reading package lists... Done
Building dependency tree
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  libaio1 libpython2.7-minimal libvorbis0a libvorbisfile3 python2.7 python2.7-minimal
Suggested packages:
  python2.7-doc binfmt-support
The following NEW packages will be installed:
  libaio1 libpython2.7-minimal python2.7 python2.7-minimal
The following packages will be upgraded:
  libvorbis0a libvorbisfile3
2 upgraded, 4 newly installed, 0 to remove and 44 not upgraded.
1 not fully installed or removed.
Need to get 0 B/2162 kB of archives.
After this operation, 7130 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
debconf: delaying package configuration, since apt-utils is not installed
E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory)
Setting up libc-bin (2.19-18+deb8u10.netgear1) ...
Processing triggers for libc-bin (2.19-18+deb8u10.netgear1) ...
dpkg: cycle found while processing triggers:
 chain of packages whose triggers are or may be responsible:
  libc-bin -> libc-bin
 packages' pending triggers which are or may be unresolvable:
  libc-bin: ldconfig
dpkg: error processing package libc-bin (--configure):
 triggers looping, abandoned
Errors were encountered while processing:
 libc-bin
E: Sub-process /usr/bin/dpkg returned an error code (1)

...它正在尝试设置libc-bin?有趣的。跑步dpkg --audit给了我这个:

# dpkg --audit
The following packages are only half configured, probably due to problems
configuring them the first time.  The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
 libc-bin             GNU C Library: Binaries

接下来是一条消息,告诉我系统中的每个软件包在数据库中都缺少 md5sums 控制文件,并且它们都需要重新安装。好吧,至少它告诉我要运行什么命令:

# dpkg --configure libc-bin
Setting up libc-bin (2.19-18+deb8u10.netgear1) ...
Processing triggers for libc-bin (2.19-18+deb8u10.netgear1) ...
dpkg: cycle found while processing triggers:
 chain of packages whose triggers are or may be responsible:
  libc-bin -> libc-bin
 packages' pending triggers which are or may be unresolvable:
  libc-bin: ldconfig
dpkg: error processing package libc-bin (--configure):
 triggers looping, abandoned
Errors were encountered while processing:
 libc-bin

……嗯。所以我无法设置libc-bin,因为它依赖于libc-bin。现在我遇到了一个问题,现在我被困住了。有什么帮助吗?

我的问题和这个问题类似,但在他的问题中,系统一直想要卸载libc-bin——就我而言,它出于某种原因不想配置 libc-bin,我认为这阻止了我修复其他软件包。

我可以在 NAS 上运行恢复出厂设置,这只会恢复 Netgear 操作系统 - 但如果我可以就地解决此问题,我更喜欢这种方法。


更多设备信息:

# cat /etc/apt/sources.list
deb https://apt.readynas.com/packages/readynasos 6.10.4 updates apps main

deb http://mirrors.kernel.org/debian jessie main
deb http://security.debian.org/ jessie/updates main
# apt install libc-bin
Reading package lists... Done
Building dependency tree
Reading state information... Done
libc-bin is already the newest version (2.19-18+deb8u10.netgear1).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libpython2.7-stdlib : Depends: libpython2.7-minimal (= 2.7.9-2+deb8u5) but it is not going to be installed
 libvorbisenc2 : Depends: libvorbis0a (= 1.3.4-2+deb8u3) but 1.3.4-2+deb8u1 is to be installed
 mysql-community-client : Depends: libaio1 (>= 0.3.93) but it is not going to be installed
 mysql-community-server : Depends: libaio1 (>= 0.3.93) but it is not going to be installed
 python : Depends: python2.7 (>= 2.7.9-1~) but it is not going to be installed
 python-mako : Depends: python2.7:any
 python-minimal : Depends: python2.7-minimal (>= 2.7.9-1~) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
# apt download libc-bin
/usr/lib/apt/methods/https: error while loading shared libraries: libcom_err.so.2: 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
#  cat /etc/apt/sources.list.d/*
deb https://download.docker.com/linux/debian jessie stable
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out entries below, but any other modifications may be lost.
# Use command 'dpkg-reconfigure mysql-apt-config' as root for modifications.
deb http://repo.mysql.com/apt/debian/ jessie mysql-apt-config
deb http://repo.mysql.com/apt/debian/ jessie mysql-5.6
deb http://repo.mysql.com/apt/debian/ jessie mysql-tools
#deb http://repo.mysql.com/apt/debian/ jessie mysql-tools-preview
deb-src http://repo.mysql.com/apt/debian/ jessie mysql-5.6
# apt-cache policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 990 http://repo.mysql.com/apt/debian jessie/mysql-tools amd64 Packages
     release o=MySQL,n=jessie,l=MySQL,c=mysql-tools,b=amd64
     origin repo.mysql.com
 990 http://repo.mysql.com/apt/debian jessie/mysql-5.6 amd64 Packages
     release o=MySQL,n=jessie,l=MySQL,c=mysql-5.6,b=amd64
     origin repo.mysql.com
 990 http://repo.mysql.com/apt/debian jessie/mysql-apt-config amd64 Packages
     release o=MySQL,n=jessie,l=MySQL,c=mysql-apt-config,b=amd64
     origin repo.mysql.com
 990 https://download.docker.com/linux/debian jessie/stable amd64 Packages
     release o=Docker,a=jessie,l=Docker CE,c=stable,b=amd64
     origin download.docker.com
 990 http://security.debian.org jessie/updates/main amd64 Packages
     release v=8,o=Debian,a=oldoldstable,n=jessie,l=Debian-Security,c=main,b=amd64
     origin security.debian.org
 990 http://mirrors.kernel.org/debian jessie/main amd64 Packages
     release v=8.11,o=Debian,a=oldoldstable,n=jessie,l=Debian,c=main,b=amd64
     origin mirrors.kernel.org
 900 https://apt.readynas.com/packages/readynasos 6.10.4/main amd64 Packages
     release a=6.10.4,c=main,b=amd64
     origin apt.readynas.com
 900 https://apt.readynas.com/packages/readynasos 6.10.4/apps amd64 Packages
     release a=6.10.4,c=apps,b=amd64
     origin apt.readynas.com
 900 https://apt.readynas.com/packages/readynasos 6.10.4/updates amd64 Packages
     release a=6.10.4,c=updates,b=amd64
     origin apt.readynas.com
Pinned packages:
 dpkg --list libc6
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                     Version           Architecture      Description
+++-========================-=================-=================-=====================================================
ii  libc6:amd64              2.19-18+deb8u10.n amd64             GNU C Library: Shared libraries
# find /lib -name libc-\*
/lib/x86_64-linux-gnu/libc-2.19.so

答案1

啊,发现问题了。我需要跑dpkg --configure --no-triggers libc-bin。这样做可以让我暂时跳过 libc-bin 上的触发器,让其apt -f install完成。

之后,触发器libc-bin仍然悬而未决,这导致了问题......但运行apt install --reinstall libc-bin似乎解决了这个问题。我仍然遇到系统无法正确启动的问题,但至少我可以再次使用 apt。

相关内容