Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error installing PCRE

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?

like image 261
Ohas Avatar asked Oct 23 '11 13:10

Ohas


People also ask

How do I install Libpcre?

To install libpcre on Debian/Ubuntu: sudo apt-get install libpcre3-dev libpcre3. To install libpcre on Redhat/CentOS: sudo yum install pcre-devel.


2 Answers

You need a C++ compiler installed, you'll most likely want g++.

With apt-get, run 'apt-get install g++', or 'apt-get install build-essential', since build-essential includes g++.

like image 167
Fredrik Håård Avatar answered Sep 22 '22 05:09

Fredrik Håård


PCRE tries to build c++ output without having a c++ compiler. Try

./configure --disable-cpp  

to disable the C++ options.

like image 39
XcodeJunkie Avatar answered Sep 22 '22 05:09

XcodeJunkie