Score:0

I removed a symbolic link, and Ubuntu became unusable

ca flag

I removed the symbolic link for '/lib/x86_64-linux-gnu/ld-2.31.so' in the directory '/usr/lib64'. Suddenly most everything stopped working. I cannot even issue simple Linux commands like 'pwd', 'ls', 'sudo'. Since 'sudo' disappeared, I cannot even restore the symbolic link I removed.

I am DIW. Please help if you know what I should do to recover.

For the record, I am running Ubuntu Mate 20.04 LTS on a desktop machine.

us flag
@ArturMeinild Please write that as an answer.
Score:5
vn flag

You removed a component of libc6, which is used by nearly everything. You should probably boot a live USB, mount your harddisk and fix the error using the live boot. Please note that I didn't test this.

Please use the official Ubuntu guide to boot a Live USB with Ubuntu.

Find out what your harddisk device name is: (I assume it's the old root partition - find the partion that matches the size)

lsblk

When the live system is running, mount your harddisk: (I assume your harddisk is /dev/sda2)

sudo mkdir -p /mnt/disk
sudo mount /dev/sda2 /mnt/disk

Create the missing symlink:

sudo ln -s /lib/x86_64-linux-gnu/ld-2.31.so /mnt/disk/usr/lib64/ld-linux-x86-64.so.2

Now shut down the system, remove the USB, and start Ubuntu as normal. Functionality should be restored.

user296662 avatar
ca flag
Yes it worked, thank you Arthur Meinild. While fixing it, I also learned something new. I would have added '/mnt/disk/' in front of '/lib/...' in the 'ln -s' command. That would have been wrong. Your prescription was dead on.
Artur Meinild avatar
vn flag
That's good to know. Yes the link will initially link to the `/lib/x86_64-linux-gnu/ld-2.31.so` of the "live" system. But since the link is static, when you reboot to your normal system, now it will link there instead. Please do me a favor and accept my answer, since it worked for you. Cheers!
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.