PHP build from source – can’t find libraries

I see this issue posted on countless threads, and the majority of the time, it is because PHP is not aware that you are on a 64-bit system and your libraries are sitting in /usr/lib64.

The solution that everyone provides is to create symbolic links from the library that PHP is expecting to the 64-bit library itself.

Okay, workable solution, but what a pain in the heck if you have quite a few libraries!

PHP has dealt with this issue by offering the –with-libdir configuration option.
 You  might be tempted to provide the full path to your libraries in this option, but for some reason, this simply doesn't work.

The example below demonstrates proper usage:

./configure --with-libdir=lib64

Why follow me on Twitter?

  • I tweet about new technologies, services or libraries I find interesting
  • Yeah, sometimes I'll post a pet-peeve or rant about something trivial
  • If I discover something that made my web development life easier, I share it
  • I'll shout out any handy tip that I think might be useful to other devs

Tagged .

Updated: 2011-11-18

Phil LaNasa follow us in feedly