The following error occurs during varnish compilation today:
Checking for library containing pthread_create...-lpthread
Checking for socket in-lsocket... no
Checking for getaddrinfo in-lnsl... yes
Checking for cos in-lm... yes
Checking for pkg-config.../usr/bin/pkg-config
Checking pkg-config is at least version 0.9.0... yes
Checking for PCRE... no
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.
Initially thought that no pcre was installed, so after the download and installation, continue, the problem persists. After prce-devel is installed. Ldconfig does not work. It was concluded that pcre-devel was not installed. Using yum install pcre-devel on the Centos server to install libpcre is a lack of libpcre package, but the system clearly exists. Then google found the answer:
Export PKG_CONFIG_PATH =/usr/local/lib/pkgconfig
After the execution, you can compile it.
Finally, varnish is successfully installed, so that my Centos server has a powerful HTTP accelerator like those of the big portal websites.