DPKG ends up with error

Bug #1659815 reported by Andreas Brolund
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Raspbian
New
Undecided
Unassigned

Bug Description

Using Jessie distribution and wanted to update.
The following steps has been done:

$ sudo apt-get update
$ sudo apt-get upgrade

The following error was reported:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  pi-bluetooth
The following packages will be upgraded:
  ca-certificates dbus dbus-x11 file firefox-esr iceweasel libc-bin libc-dev-bin libc6 libc6-dbg libc6-dev libcairo-gobject2 libcairo2 libdbus-1-3 libdbus-1-dev libfcgi-perl libgnutls-deb0-28
  libgnutls-openssl27 libgudev-1.0-0 libhogweed2 libio-socket-ssl-perl libmagic1 libmpg123-0 libmysqlclient18 libnettle4 libpam-modules libpam-modules-bin libpam-runtime libpam-systemd libpam0g
  libpng12-0 libpng12-dev libsystemd-login0 libsystemd0 libtiff5 libudev1 libwmf0.2-7 libxpm4 locales multiarch-support mysql-common mysql-server-core-5.5 python-crypto sed systemd systemd-sysv tzdata
  udev
48 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
Need to get 40.3 MB/68.1 MB of archives.
After this operation, 158 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main libxpm4 armhf 1:3.5.12-0+deb8u1 [43.7 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main firefox-esr armhf 45.7.0esr-1~deb8u1 [40.1 MB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ jessie/main iceweasel all 45.7.0esr-1~deb8u1 [118 kB]
Fetched 40.3 MB in 12s (3,353 kB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
Setting up bash (4.3-11+deb8u1) ...
/var/lib/dpkg/info/bash.postinst: line 26: /usr/bin/update-menus: cannot execute binary file: Exec format error
dpkg: error processing package bash (--configure):
 subprocess installed post-installation script returned error exit status 126
Errors were encountered while processing:
 bash
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

Found no way to make update work again, other then restore system.
A way to repair dpkd would be highly appreciated.

Workaround:

Restore system from backup then

$ sudo apt-mark hold bash
$ sudo apt-get update
$ sudo apt-get upgrade

makes update working but if I unhold bash I see the same issue

System info:
Raspberry 2b
Linux raspberrypi 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l GNU/Linux
dpkg -s libc6 | grep ^Version -> Version: 2.19-18+deb8u7

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.