Can't use terminal after replacing /lib64/libdl.so.2

General support questions
Post Reply
homer_3
Posts: 3
Joined: 2019/09/18 15:14:28

Can't use terminal after replacing /lib64/libdl.so.2

Post by homer_3 » 2021/01/25 18:14:45

I didn't expect simply replacing a file to immediately crash everything. I've been trying to debug a linking error after installing gcc 10.2 and thought maybe the issue was my linker was old too. I couldn't find a guide, so I thought I'd just copy the linker files over from a machine that was working for me. So I ran ldd on ld to see what shared libs it used, made copies to back them up, then as soon as I overwrote this one file, I got these errors

relocation error: /lib64/libpam.so.0: symbol dlclose, version GLIBC_2.2.5 note defined in file libdl.so.2 with link time referance
relocation error: /lib64/libdl.so.2: symbol _dl_catch_error, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference

Anyone know how to recover from this? I still have a backup of the correct file, just no way to put it back.

sml
Posts: 221
Joined: 2020/01/17 09:01:44

Re: Can't use terminal after replacing /lib64/libdl.so.2

Post by sml » 2021/01/25 18:48:37

Boot from a Live USB or to the rescue kernel (it uses a bigger than usual initramfs image with more tools), and restore the file.
Last edited by sml on 2021/02/05 13:06:56, edited 1 time in total.

homer_3
Posts: 3
Joined: 2019/09/18 15:14:28

Re: Can't use terminal after replacing /lib64/libdl.so.2

Post by homer_3 » 2021/01/25 18:56:04

I forgot live USBs were a thing. I knew about live CDs, but don't have a burner anymore. I didn't know about the rescue kernel, but I might try that since I already have a DVD install image I can use.

Post Reply

Return to “CentOS 7 - General Support”