How to fix error while loading shared libraries: when installing GNUPG

I was trying to install GNU Privacy Gaurd and ran into this error on the make.

gnupg ../../g10/gpg2: error while loading shared libraries: cannot open shared object file: No such file or directory

I was able to fix this by running the following command:

ldconfig -v

This may not work for everyone but I thought I would put this out there in case someone else runs into this issue.


I’m getting the same error when trying to install gpg2. Can you go into slightly more detail explaining how you used the ldconfig command? Thanks.

I have edited the post a bit. I just ran lsdconfig -v and it worked for me. Not sure what it did but I thought I would throw it up in case it works for someone else.

Leave a Reply

Your email address will not be published. Required fields are marked *