Missing pcre.h when installing pecl_oauth
I was playing with pecl_oauth last week (more about that in a later post) and when I tried to install from PECL, it grabbed the files, ran the configure step but stopped with an error status during make. This is bad news for those of us who are ubuntu users rather than compile-happy linux users! Closer inspection showed this line around the point things started to go wrong:
Error: /usr/include/php5/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory
I didn’t have the header files for pcre installed – in ubuntu the headers are in the -dev packages so I just installed what I needed:
sudo aptitude install libpcre3-dev
Re-attempting the pecl install, everything worked as expected. This is on Ubuntu 10.04 Lucid Lynx, and from reading around you’d want to install the same package in response to this error message, regardless of what you were doing to cause it. Hope this helps someone.
not really sure which package one is supposed to install to get past this issue?
randy: it’s the libpcre3-dev package – I am having issues with my geshi plugin and it had somehow hidden the code in the post! Sorry about that :(
On OS X 10.6.5, download pcre from http://www.pcre.org/ and run ./configure
This creates a pcre.h file which you then need to copy to /usr/include
pecl install oauth should then work.
Just Install it
# yum install pcre-devel