Ubuntu – Compiling PHP 5.3.3 on Ubuntu 8.04: Could not find libevent

PHPUbuntu

When attempting to ./configure PHP 5.3.3 on Ubuntu 8.04, I get the error:

 checking for libevent >= 1.4.11 install prefix...
 configure: error: Could not find libevent >= 1.4.11 in /usr/local/

I tried installing the libevent-dev and libevent1 packages, but same error.

I then removed the packages, downloaded and compiled libevent from source. Same error.

Locate shows that libevent was installed to /usr/local/lib/libevent.so with all its friends in /usr/local/lib/.

I tried configuring with the option:

--with-libevent-dir=/usr/local/lib/ 

Basically the same error:

 checking for libevent >= 1.4.11 install prefix...
 configure: error: Could not find libevent >= 1.4.11 in /usr/local/lib/

Any suggestions??

Best Answer

Apparently there's a bug in the configure script. The work around is to run:

export LD_LIBRARY_PATH=/usr/local/lib

prior to running ./configure.