2

I have a Netgear ReadyNAS machine which internally runs a modified version of Debian Jessie. I mainly use it as a server and have a few Docker containers which I run on it. I can't upgrade past Jessie or put a different OS in without bricking the NAS entirely (unless there's something I missed). I voided my Netgear warranty simply by SSHing in as root, but surely nothing can go poorly, right?

Well... I made the mistake of running apt upgrade a couple weeks ago, and after a power outage I noticed my NAS wasn't responding to SSH. After Googling around a bit, I managed to reboot it into Netgear's internal tech support mode so I could telnet in, and I noticed that the machine was stalling when trying to start Netgear's services:

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'.

Hmm -- sure, this is all some proprietary stuff, but I feel like not being able to access libcom_err.so.2 is bad. So I went to reinstall the package, and I noticed that trying to run apt gave me this:

# 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).

Okay, easy enough -- run 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)

...It's trying to set up libc-bin? Interesting. Running dpkg --audit gave me this:

# 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

Followed by a message telling me that every package in my system is missing a md5sums control file in the database and they all need to be reinstalled. Well, at least it tells me what command to run:

# 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

...Huh. So I can't set up libc-bin, because it depends on libc-bin. Now I have a problem, and now I'm stuck. Any help?

My question is similar to this question, but in his problem the system kept wanting to uninstall libc-bin -- in my case, it doesn't want to configure libc-bin for some reason, and I think that's blocking me from fixing the other packages.

I can run a factory reset on the NAS which will just put the Netgear OS back -- but if I can fix this problem in-place I'd prefer that approach.


Some more device info:

# 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 Answer 1

4

Ah, found the problem. I needed to run dpkg --configure --no-triggers libc-bin. Doing that let me temporarily skip triggers on libc-bin, letting apt -f install complete.

Afterward, the triggers for libc-bin were still pending, which was causing issues... but running apt install --reinstall libc-bin seemed to fix it. I still have an issue where my system doesn't boot correctly, but I can use apt again at least.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .