Score:0

I'm having trouble logging on because a shared library is missing

lc flag

I wanted to repair libpam.so.0 for a better game experience in Ubuntu 18.04. sudo was crashed so I tried deleting it. I didn't know that this file was so important for booting.

Here is the error:

picture of a screen showing text

Pilot6 avatar
cn flag
You deleted something important. We can't guess what you mean by "I tried deleting it". The best solution is to re-install.
Score:3
in flag

The easiest way to fix broken linux installs that are broken and wont boot is by using a Linux Live boot cd, and chroot.

Boot into the (in your case Ubuntu) live boot cd, open a shell.

if your broken install is located on a ext4 or similar partition using lsblk identify the drive and partition that you broken install is on.

If you have used a Logical Volume then do lvscan to identify the logical volume

make a dir to mount the broken install on. eg: mkdir /mnt/broken

then mount the broken install eg: mount /dev/sda1 /mnt/broken or for a logical volume mount /dev/mapper/ubuntu--vg-ubuntu--lv /mnt/broken

In order to use some of the system commands you will need to mount a number of special directories within the broken file structure before chroot, this is what I use, others may use slightly different mounts, but this will work fine.

TARGETDIR="/mnt/broken"
mount -t proc proc $TARGETDIR/proc
mount -t sysfs sysfs $TARGETDIR/sys
mount -t devtmpfs devtmpfs $TARGETDIR/dev
mount -t tmpfs tmpfs $TARGETDIR/dev/shm
mount -t devpts devpts $TARGETDIR/dev/pts

then you need to run chroot /mnt/broken

this will now place you into the broken linux operating system, and you can start repairing the files you deleted incorrectly, apt should work. If you have additional drives that were mounted in your file system mount -a will mount all drives listed in your fstab file.

you should be able to reinstall the packages/files you delete

  • sudo or root shell is assumed for all commands above
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.