I am trying to compile Varnish caching on my Mac OS X When I do (as root):

./autogen.sh


I get this error:

+ glibtoolize --copy --force
./autogen.sh: line 44: glibtoolize: command not found


And then when I do this:

./configure --enable-developer-warnings --enable-debugging-symbols


I get this error:

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.


Does anyone know how to solve this?

I tried installing Varnish with homebrew and I got this:

sudo brew link pkg-config pcre
Error: Cowardly refusing to `sudo brew link`
You can use brew with sudo, but only if the brew executable is owned by root.
However, this is both not recommended and completely unsupported so do so at
your own risk.


This was recommend that I do before installing.
The easiest solution is to use a package manager like brew.

Download and install it using the installer on their website.

And then simply brew install varnish. It will download and install all the prerequisites for you.