Resolving libcrypt.so.1 Shared Library Issue During Debian Buster Upgrade (relianoid v5/v6)

View Categories

Resolving libcrypt.so.1 Shared Library Issue During Debian Buster Upgrade (relianoid v5/v6)

1 min read

Problem Description #

During the upgrade process of Debian Buster, users may encounter an issue with the libc6 package, resulting in the error message:

/usr/bin/perl: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory
(Reading database ... 49108 files and directories currently installed.)
Preparing to unpack .../libc-dev-bin_2.36-9+deb12u3_amd64.deb ...
Unpacking libc-dev-bin (2.36-9+deb12u3) over (2.28-10+deb10u1) ...
Setting up libc6:amd64 (2.36-9+deb12u3) ...
/usr/bin/perl: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No
such file or directory
dpkg: error processing package libc6:amd64 (--configure):
 installed libc6:amd64 package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
 libc6:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

Analysis #

The error arises during the upgrade from Debian Buster to Bookworm due to circular dependencies between libc and libcrypt that have been deliberately avoided in Bookworm. The circular dependencies result in the absence of the required shared library libcrypt.so.1. The libc6 package fails to configure correctly, triggering an error exit status. This situation highlights the efforts in Bookworm to break circular dependencies, leading to potential issues during upgrades.

Resolution steps #

To resolve this issue, follow the manual resolution steps outlined below:

1. Open a terminal and navigate to a temporary directory:

root@noid-ce-01:~# cd $(mktemp -d)
root@noid-ce-01:/tmp/tmp.XX#

2. Download the libcrypt1 package:

root@noid-ce-01:/tmp/tmp.XX# apt -y download libcrypt1

3. Extract the contents of the libcrypt1 package:

root@noid-ce-01:/tmp/tmp.XX# dpkg-deb -x libcrypt1_*.deb .

4. Copy the extracted library files to the system’s library directory:

root@noid-ce-01:/tmp/tmp.XX# cp -ra lib/* /lib/

5. Perform a fix on any broken installations:

root@noid-ce-01:/tmp/tmp.XX# apt -y --fix-broken install

6. Complete the upgrade of the minimal software stack:

root@noid-ce-01:~# apt-get upgrade
root@noid-ce-01:~# apt-get dist-upgrade

After following these steps, the missing libcrypt.so.1 library should be installed, and the libc6 package should configure without errors. Users can then proceed with the Debian Buster upgrade without encountering the previously reported issues.

Note: Ensure that you have appropriate privileges to execute these commands and consider backing up critical data before performing system upgrades.

References #

https://linux.debian.bugs.dist.narkive.com/ieDiOOQ6/bug-993755-libcrypt-so-1-cannot-open-shared-object-file-when-upgrading-from-stretch-to-sid

SHARE ON:

Powered by BetterDocs