linux pcre-devel,ubuntu - 我应该为'pcre-devel'安装什么软件包? - Ubuntu问答

博客围绕在Ubuntu上编译lighttpd需安装pcre-devel软件包的问题展开。介绍了最佳方法,即使用apt-cache search并grep关键字dev,找到对应包后用apt-get install安装;还给出次佳方法,列举了不同语言适用的包,同时指出lighttpd已有相关安装选项。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题描述

我需要安装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

$

参考资料

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值