libevent and libexpat not found

Hello.

I'm running Centos 7.5 with a 4.19.elrepo kernel and am trying to compile Unbound 1.8.1. My configure options are:

./configure --with-libevent=/usr/lib64/libevent.so --with-libexpat=/usr/lib64/libexpat.so --enable-checking --enable-static-exe --enable-lock-checks --enable-alloc-checks --with-conf-file=/var/spool/postfix/usr/lib/unbound/unbound.conf --with-pidfile=/var/spool/postfix/usr/lib/unbound/unbound.pid --with-run-dir=/var/spool/postfix/usr/lib/unbound --with-chroot-dir=/var/spool/postfix/usr/lib/unbound --with-rootkey-file=/var/spool/postfix/usr/lib/unbound/root.key --with-rootcert-file=/var/spool/postfix/usr/lib/unbound/ --disable-gost

The specific problem I'm having is getting it to recognize libevent and libexpat (I have installed the header files, expat-devel and libevent-devel as well as the core files). The messages I get are:
1) for libevent: 'configure: error: Cannot find the libevent library in /usr/lib64/libevent.so'
2) for libexpat: 'configure: error: Could not find libexpat, expat.h'

Also, based on a message board, I saved a file in /etc/ld.so.conf.d called usr-local.conf and wrote /usr/lib64/libevent.so and /usr/lib64/libexpat.so. I then saved and entered 'ldconfig' into the terminal and pressed enter. There was no change though.

Have I got the names of the libevent and libexpat library files correct? Where else can I be looking to fix this (FYI, I have 1.8.1 up and running with Debian). While I understand these two libraries are not essential I've experienced markedly improved performance with them in the past so I'd like to try and keep them.

Any and all thoughts are most welcome.

(P.S. I went back to March in the archives looking for information on this but didn't find any. My luck the answer will be on the page, crystal clear in February).

You don’t need the ld.conf.d file, as /usr/lib64 should already be covered by the base ld.conf file (anyways, ld.so.conf expects directories, not files).

For configure, either drop the “=“ part altogether (eg, just —with-libevent) or use —with-libevent=/usr as it expects a prefix.

-Dustin

You don’t need the ld.conf.d file, as /usr/lib64 should already be covered by the base ld.conf file (anyways, ld.so.conf expects directories, not files).

For configure, either drop the “=“ part altogether (eg, just —with-libevent) or use —with-libevent=/usr as it expects a prefix.

-Dustin