Compiling Apache: can’t find libpng.so
by ZetaGecko | Add Your Comments | Server Administration
I was recomiling Apache today to update a few modules to their latest versions, and ran into a problem I hadn't seen before: the configure script complained that it couldn't find libpng.(a|so) (meaning libpng.a or libpng.so). I did a bunch of searching online looking for solutions, and after trying a number of things that didn't work, discovered the source of the problem: a recent Debian update had resulted in two versions of libpng being installed on my system. In such a case, the system apparently figures that neither version should be given precedence over the other, so the usual symbolic links that would have been named "libpng.a" and "libpng.so" didn't get created. When I deleted the older package, the symlinks to the newer package magically appeared!
Prior to discovering that fix, one thing I'd tried was manually creating the symlink. It worked to a point, but the configure script then failed at the next step, where it was looking for png.h. Perhaps that was also fixed by removing the old libpng (after all, I'd compiled successfully before), or perhaps it was fixed by my having also installed the libpng-dev package.
As I write, I see in my terminal window that the compilation process has sucessfully passed the point where the error occurred.