Comment 27 for bug 1943124

Revision history for this message
Yavor Nikolov (yavor-nikolov) wrote (last edit ):

I had a similar issue yesterday - not during release upgrade but when installing package updates (Ubuntu 21.10):

package libc6 2.34-0ubuntu3.2 failed to install/upgrade: unable to open '/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2.dpkg-new': Text file busy

The way I resolve it is via dual-boot, I boot to alternative installation, I mount the one which I want to update to let's say /mnt and I do:
dpkg -i --root=/mnt libc6.....deb

This leads to an error "too many levels of symbolic links" but after that I can login to my main installation and finish the package updates.

###
Update: I am sharing a bit more since I experienced more issues after the above steps.

Then I faced the same issue in my alternative environment: in attempt to fix it, I broke my main one... After a while I discovered that after attempts using chroot, dpkg -i --root=... - I get into an issue due to getting symlink like that:

/mnt/new/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 -> /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2

This leads to errors like "too many levels of symbolik links" on attempt to chroot, or kernel panik on attempt to bood directly from the affected environment.

To fix it, I do:
rm /mnt/new/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
cp -a /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 /mnt/new/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2