问题描述
我需要安装pcre-devel软件包才能在Ubuntu上编译lighttpd:
configure: error: pcre-config not found, install the pcre-devel package or build with –without-pcre
你能告诉我怎么做吗?
最佳方法
尝试使用apt-cache search,例如
sudo apt-cache search pcre
对我来说,这出现了很多,所以我为关键字dev做了grep。
这将打开libpcre3-dev和libpcre++-dev。
lighttpd无疑会使用其中之一。
因此,如果您的搜索显示libpcre3-dev,则可以使用:sudo apt-get install libpcre3-dev进行安装
但是,您是否有任何理由自己编译lighttpd?为什么不使用apt-get安装?包括lighttpd-dev,lighttpd-doc和一些相关模块。
次佳方法
在Ubuntu 9.10上:
$ apt-cache search pcre | grep -- -dev
libpcre3-dev - Perl 5 Compatible Regular Expression Library - development files
libghc6-pcre-light-dev - Haskell library for Perl 5-compatible regular expressions
libghc6-regex-base-dev - GHC 6 library providing an API for regular expressions
libpcre++-dev - C++ wrapper class for pcre (development)
libpcre-ocaml-dev - OCaml bindings for PCRE (Perl Compatible Regular Expression)
$
对于C,则为libpcre3-dev;对于C++,则为libpcre++-dev。
同样,lighthttpd也已经存在:
$ apt-cache search lighttpd
collectd - statistics collection and monitoring daemon
lighttpd - A fast webserver with minimal memory footprint
lighttpd-dev - Development files for lighttpd
lighttpd-doc - Documentation for lighttpd
lighttpd-mod-cml - Cache meta language module for lighttpd
lighttpd-mod-magnet - Control the request handling module for lighttpd
lighttpd-mod-mysql-vhost - MySQL-based virtual host configuration for lighttpd
lighttpd-mod-trigger-b4-dl - Anti-deep-linking module for lighttpd
lighttpd-mod-webdav - WebDAV module for lighttpd
mongrel-cluster - Mongrel plugin to manage a cluster of Mongrel servers
mono-fastcgi-server - ASP.NET backend for FastCGI webservers - default version
mono-fastcgi-server1 - ASP.NET 1.1 backend for FastCGI webservers
mono-fastcgi-server2 - ASP.NET 2.0 backend for FastCGI webservers
$
参考资料