How to solve the "No package 'libpcre' found" error when installing varnish accelerator in centos6

Source: Internet
Author: User
Tags centos centos server varnish

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.