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

I am trying to use sendmail in a bash script to send an email to my gmail account upon the completion of a task (Rsync of a folder to remote drive). When I invoke sendmail from the command line I get the above error message.

When I use “find” and also “locate” from the command line then find no files named*.

Yet when I use the “Add Remove Software” desktop application and search for libnsl it returns libnsl 2.0.0-1 and lib32-libsnl 2.0.0-1. If I click on libnsl 2.0.0-1 and look at the files it includes and and

The error message above says sendmail is looking for

I have used the command pamac update and pamac upgrade from the command line and they both return that I am up to date.

Can someone help with this error.

Thanks in advance for your help.


[01:21:55][aragorn] >  ll /usr/lib/libnsl*
-rwxr-xr-x 1 root root 96432 May 12  2021 /usr/lib/
lrwxrwxrwx 1 root root    15 Aug 20 00:06 /usr/lib/ ->
lrwxrwxrwx 1 root root    14 May 12  2021 /usr/lib/ ->
lrwxrwxrwx 1 root root    15 Aug 20 00:06 /usr/lib/ ->
-rwxr-xr-x 1 root root 30544 Aug 20 00:06 /usr/lib/

[01:22:20][aragorn] >

Most of those files are symlinks. Try symlinking /usr/lib/ to /usr/lib/ :arrow_down:

ln -s /usr/lib/ /usr/lib/

This worked!! Thank you for your instructions! Now when I call “sendmail” from the command line I get no error message other than I must have a recipient. I will move on from here. Again thanks for your help!

Note that your response should be marked as a “solution” and this post marked as “resolved”.

1 Like

While this work, the real solution is to re-build sendmail against the new version

From which package come sendmail?

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.