How to fix "/usr/local/lib/libldap_r-2.4.so.2: no version information available" error

When I ran "sudo apt update" this morning these errors showed up:

/usr/lib/apt/methods/https: /usr/local/lib/libldap_r-2.4.so.2: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl-gnutls.s
o.4)
/usr/lib/apt/methods/https: /usr/local/lib/liblber-2.4.so.2: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.
4)

This error means libcurl was compiled with a version of libldap_r other than what I have in /usr/local/lib. So a work around is to symlink the missing files:

sudo ln -fs /usr/lib/liblber-2.4.so.2 /usr/local/lib/ 
sudo ln -fs /usr/lib/libldap_r-2.4.so.2 /usr/local/lib/