Tuesday, March 15, 2011

Building Varnish on Ubuntu: libpcre

While trying to use plone.recipe.varnish, i ran into an error:
SystemError: ('Failed', './configure --prefix=/home/kees/project_buildouts/wsr/parts/varnish-build')


Going into the directory in /tmp and trying to run ./configure there, i get:
configure: error: Package requirements (libpcre) were not met:

No package 'libpcre' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables PCRE_CFLAGS
and PCRE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.


The answer is to simply install the package libpcre3-dev.

On Debian, you might also have to do:

export PCRE_LIBS="-L/usr/lib -lpcre"
export PCRE_CFLAGS=-I/usr/include/pcre