[clue-tech] Broke Apache by upgrading PCRE
Matt Gushee
mgushee at havenrock.com
Sat Jul 9 10:53:46 MDT 2005
William wrote:
> httpd was updated with yum and was working fine until the PCRE upgrade.
> PCRE was upgraded from source (ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/) to the
> latest version.
Do you know what your Apache uses PCRE for? Mine doesn't, and neither do
any of the modules I have installed--at least not directly.
> Error message when executing "service httpd start" (as root):
> =============================================================
> Starting httpd: /usr/sbin/httpd: symbol lookup error: /usr/lib/libpcreposix.so.0: undefined
> symbol: pcre_compile2 [FAILED]
Let's see ... you probably know this, but just for the sake of
thoroughness, "symbol lookup error" means that *something* is trying to
call a function that is expected to be provided by an external library,
but for some reason that function is unavailable. From the above error
message, it appears that some function in libpcreposix is attempting to
call pcre_compile2. Now, what library would provide that?
Well, time to play "Grep-the-Headers." On my system:
$ grep pcre_compile /usr/include/*.h
/usr/include/pcre.h:extern pcre *pcre_compile(const char *, int, ...
So there is a 'pcre_compile' function defined in libpcre. I'd be willing
to bet that (1) some version of libpcre has a 'pcre_compile2' function,
but not the one I have, and (2) if you run the above 'grep' command, you
will also find 'pcre_compile' but not 'pcre_compile2'.
So first of all I would check the timestamps on the relevant libraries:
$ ls -l /path/to/libs/libpcre*
libpcre.so.* and libpcreposix.so.* should have been created at the same
time. If they weren't, that is presumably because you compiled/installed
one of them but not the other. In that case you would need to rebuild
PCRE, this time making sure that both libs get built ... maybe there's a
configure option, '--with-posix' or something like that?
On the other hand, if the two libraries were created at the same time,
it could be a bug in PCRE ... but I wouldn't rule out a configuration
problem just yet.
Two things that come to mind are:
Did you remember to run 'ldconfig' after you installed PCRE?
Is it possible you have another version of either libpcre or
libpcreposix that you installed once and forgot about ... in
/usr/local/lib, for example? Check all the paths listed in
/etc/ld.so.conf; and if you have $LD_LIBRARY_PATH defined, check those
paths too.
Hope this helps.
--
Matt Gushee
Englewood, CO, USA
_______________________________________________
CLUE-tech mailing list
CLUE-tech at cluedenver.org
http://cluedenver.org/mailman/listinfo/clue-tech
More information about the clue-tech
mailing list