Error while loading shared libraries:

I just tried to update my system and the konsole window auto-closed mid-update without providing any warning. When I try to repeat the update, I am given the following error:

sudo: error while loading shared libraries: cannot open shared object file: No such file or directory

Running ls -l libcrypto* of my /usr/lib directory gives the following:

lrwxrwxrwx 1 root root 20 Aug 9 13:03 →
lrwxrwxrwx 1 root root 20 Aug 9 13:03 →
-rwxr-xr-x 1 root root 4382736 Aug 9 13:03
lrwxrwxrwx 1 root root 14 Nov 1 14:21 →
-r-xr-xr-x 1 root root 2828704 Jan 25 2020
-rwxr-xr-x 1 root root 4484080 Nov 1 14:21

I’m afraid to reboot into a failed update and I’m not sure what next to do.

I’m not sure what logs to provide, or what next to do. Thanks very much for any guidance.


There was this thread with somewhat similar issue:

1 Like

I saw that, but it was a different error with a different reference, so I was unsure it was applicable. Is it? If so, I’m going to need some assistance with implementing the solution.

I haven’t had this issue myself. Searching in Arch forum, there seems to be quite a few suggestions to resolve this.

One is to refresh the mirrors and try sudo pacman -Syyu to ensure that the system is not in a partial upgrade state.

You might want to try that first and see how it fares.

I’ve tried to update mirrors and sudo pacman -Syyu, but any command I issue with sudo is met with the same error. Does this mean I’ll need to chroot in to accomplish this? That strikes terror in my soul, but I’ll try if that’s what’s needed …

Thanks, @pebcak

1 Like

Well, this i a bit beyond my reach.
Honestly, I can’t tell if the issue can be resolved from the chroot. It might.

I would leave things as they are for the moment and wait for more competent users to chime in.
The upgrade to openssl 3.0.7-2 is apparently causing issues in some systems and most probably more information will be coming in on how to resolve it.

Sorry for not being of more help @bkaplan .

1 Like

mayby crypto++ is outdated ? also dont see any bond with openssl en crypto++ its a openssl issue atleast

openssl provides

$ pacman -Ql openssl | grep libcrypto
openssl /usr/lib/
openssl /usr/lib/
openssl /usr/lib/pkgconfig/libcrypto.pc

Apparently, here something has gone wrong since sudo is looking to load the older

$ pactree sudo | grep openssl 
│ │   │ │ └─openssl
│ │   │   └─openssl
├─openssl provides
└─openssl provides
1 Like

Seems this post has a solution?

Click me!

It’s the multiverse. No way around it.


What does it show?

sudo pacman -Syu

Any command that uses sudo results in the same error message:

sudo: error while loading shared libraries: cannot open shared object file: No such file or directory

Did you try installing openssl-1.1

Edit: Supposedly it provides

His sudo is not working :wink:

Would need to download the tar package and update with pacman command?

It needs sudo, doesn’t it?

Not sure if pacman -U needs it? I’ve only used it a couple of times.

Of course it does. It needs to make changes to the system.

Okay then… sudo is screwed. :laughing: