I'm trying to install PCRE on my Ubuntu 11.10 Server. When I run the "make" command, I get a really long output which always ends in this error:
libtool: link: ( cd ".libs" && rm -f "libpcreposix.la" && ln -s "../libpcreposix.la" "libpcreposix.la" ) source='pcrecpp.cc' object='pcrecpp.lo' libtool=yes \
DEPDIR=.deps depmode=none /bin/bash ./depcomp \
/bin/bash ./libtool --tag=CXX --mode=compile -DHAVE_CONFIG_H -I. -c -o pcrecpp.lo pcrecpp.cc libtool: compile: unrecognized option `-DHAVE_CONFIG_H' libtool: compile: Try `libtool
--help' for more information. make[1]: *** [pcrecpp.lo] Error 1 make[1]: Leaving directory `/home/root/src/pcre/pcre-8.12' make:
*** [all] Error 2
I did run "configure". Any ideas?
I've had the same problem and the solution was to do everything suggested in the other answers and installing the developement files for PCRE:
I found an answer as to why, but not a cure; (i know this is an old question but I thought I would contribute anyway).
I found pcre was already installed on my system, but apparently libtool was not. When I tried to sudo apt-get install libtool i got
Don't have much of an idea why this is happening, but working on finding out! Hopes this answers your question.
PCRE tries to build c++ output without having a c++ compiler. Try
to disable the C++ options.
To install
pcre
package, you need to run 2 commands:apt-get install libpcre3 libpcre3-dev
apt-get install build-essential libpcre3-dev libxslt1-dev libgd2-xpm-dev libgeoip-dev libssl-dev
Why not find PCRE using
apt-cache search pcre | grep pcre
and then useapt-get install
to install PCRE? I think PCRE has been already included in the repository.This is the result of the above command in my computer (Ubuntu 10.04):
When I run configure I get:
libpcre checking for windows.h... no configure: error: Invalid C++ compiler or C++ compiler flags
Fix was to install g++ as Fredrik mentioned. On CentOS:
yum install gcc-c++