2

I have tried to install some packages (apache mariaDB) and something went wrong from my sudo apt install apache2 mariadb-server apt-transport-https

At the end there was an error

Checking init scripts...
Unpacking libc6:armhf (2.32-4+rpi1) over (2.29-2+rpi1) ...
Setting up libc6:armhf (2.32-4+rpi1) ...
/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:armhf (--configure):
 installed libc6:armhf package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
 libc6:armhf
Error: Timeout was reached
E: Sub-process /usr/bin/dpkg returned an error code (1)
You have new mail in /var/mail/pi

Which seems to be a known bug. People back then (March 2021) was updating to gblic2.30 and libcrypt around 4.4.10, I was updating to libc62.32 and libcrypt1:4.4.27, so I do not know why the bug is still around (!)

My understanding from the bug is that I need to put a link or a file where this library is expected, e.g.

ln -s /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1 /lib/libcrypto.so.1

Only problem is that I need to become root to do that, and sudo or su are just impossible right now, even login from ssh is impossible!

I read that the only hope here is to create the file or symlink either booting the machine from a liveCD/USB, or putting the SD card holding the root file-system and edit that part by hand.

My questions is:

  • before I power off this raspberry pi and take out the SD card to create the link by hand, while I still can use the terminal from which I am logged on, is there any repair I can attempt?

I stress the fact that I cannot sudo ...

1

1 Answer 1

0

There is no way to create the link if you cannot become root.

I think you have to use a Linux system where you can work as root, insert the SD card and create the link.

Note that the unmodified ln -s ... command would create the link in the directory of your running system, not on the SD card. You would have to use something like

ln -s /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1 /path/to/the/sd-card/lib/libcrypto.so.1

or

cd /path/to/the/sd-card/lib && ln -s /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1 libcrypto.so.1

Check that the shared library /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1 exists on the SD card. Otherwise you might have to find the correct name and/or location.


Note: This answer covers only the problem how to create the link if you don't have root access. I don't know if this will fix all problems. You might have to fix broken packages or incomplete package installations after creating the link and booting your Raspberry Pi.

5
  • Thanks for pointing out the issue of where the SD will be mounted.
    – Rho Phi
    Jan 26, 2022 at 15:05
  • In any case, it seems clear the issue is all there? or there are other possible issues I am not seeing? suggestions?
    – Rho Phi
    Jan 26, 2022 at 15:06
  • I extended my answer. It only covers the problem how to create the link if you don't have root access. I don't know if this will fix all problems. You might have to fix broken packages or incomplete package installations after creating the link and booting your Raspberry Pi.
    – Bodo
    Jan 26, 2022 at 15:13
  • a comment on how to shutdown, not being root or not being anymore to sudo.The ups daemon still works, so I have plugged off the power and let it run on battery till it reached the threshold and at least it was shutdown properly.
    – Rho Phi
    Jan 27, 2022 at 17:36
  • I have not added a question, I have commented on how I succeeded to shutdown.
    – Rho Phi
    Jan 27, 2022 at 17:59

You must log in to answer this question.

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