Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm just finished installing Ubuntu 13.10.

I want try Phalcon, and when I build the source (phalcon.so), I have this error :

     from /home/fabrice/Downloads/cphalcon/build/32bits/phalcon.c:204:
/usr/include/php5/ext/pcre/php_pcre.h:29:18: fatal error: pcre.h: No such file or directory
 #include "pcre.h"
                  ^
compilation terminated.
make: *** [phalcon.lo] Erreur 1

My installation of lamp is :

sudo apt-get install -y apache2 php5 mysql-server libapache2-mod-php5 php5-mysql php5-curl php5-imagick php5-mcrypt php5-memcache php5-sqlite php5-xdebug php-apc php5-intl php-mongo php5-dev gcc

Can anybody help me ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
665 views
Welcome To Ask or Share your Answers For Others

1 Answer

The latest version of Phalcon uses PCRE libraries.

You can install them like so:

sudo apt-get install libpcre3-dev

and then try and install Phalcon again

For CentOS you will need to use

sudo yum install pcre-devel

Credits: @xgretsch

For Mac you can use

brew install pcre

Credits @Brandon Romano

For Mac without brew

Go to https://www.pcre.org/ and download latest pcre:,

tar -xzvf pcre-8.42.tar.gz
cd pcre-8.42
./configure --prefix=/usr/local/pcre-8.42
make
make install
ln -s /usr/local/pcre-8.42 /usr/sbin/pcre
ln -s /usr/local/pcre-8.42/include/pcre.h /usr/include/pcre.h

Credits @user1377324


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...