apt install: installed libc-bin package post-installation script subprocess returned error exit status 139
Closed this issue · 0 comments
Anze- commented
HARDWARE:
Lenovo Duet 64gb Mediatek
OS:
CadimiumOS release 0.4.0 pre2, Debian, installed on USB medium.
ISSUE:
when installing packages via apt, the following error appears
Setting up libc-bin (2.36-5) ...
Segmentation fault
Segmentation fault
dpkg: error processing package libc-bin (--configure):
installed libc-bin package post-installation script subprocess returned error exit status 139
Errors were encountered while processing:
libc-bin
E: Sub-process /usr/bin/dpkg returned an error code (1)
FIX:
I could fix this error by removing libc and forcing a reinstall. Since libc-bin is "essential" I had to used a script to be run as root, with the following content:
#!/bin/bash
printf "This script will attempt to reinstall libc-bin.\n\nIt's removal might brick your system.\n\nPLEASE RUN AS ROOT: and check this script contents!\n\nIf you wish to proceed please press enter, otherwise exit with CTRL+C\n"
read proceed
count=6
echo "starting in"
while (( --count>=1 ));do printf $count...; sleep 1; done
printf "\n=== Reinstalling libc-bin. DO NOT QUIT! WAIT UNTIL COMPLETED! ==="
sleep 3
mv /var/lib/dpkg/info/libc-bin.* /tmp/
dpkg --remove --force-remove-essential --force-depends libc-bin
dpkg --purge --force-depends libc-bin
apt install --reinstall libc-bin
mv /tmp/libc-bin.* /var/lib/dpkg/info/
echo "libc-bin reinstalled: apt 'post-installation script subprocess returned error' should now be fixed"