在Ubuntu或者Debian中安装PCRE库

来源:互联网 发布:三星s8网络制式 编辑:程序博客网 时间:2024/06/05 07:38
我需要编译一些应用程序,同时也需要Perl 5兼容正则表达式库(PCRE)。在CentOs下,我可以使用一个叫pcre-devel,但是Debian可就不一样了。我怎样在Debian/Ubuntu Linux下安装pcre-devel呢?

Perl-compatible regular expression library. PCRE has its own nativeAPI, but a set of “wrapper” functions that are based on the POSIXAPI are also supplied in the library libpcreposix. Note that thisjust provides a POSIX calling interface to PCRE: the regularexpressions themselves still follow Perl syntax and semantics. Theheader file for the POSIX-style functions is called pcreposix.h. Toinstall PCRE, type thy following command:

Perl兼容正则表达式库(PCRE)有自己原生API,但是这一系列封装函是基于POSIX API,而POSIXAPI也支持libpcreposix库。这样只要提供一个POSIX的调用接口给PCRE后,正则表达式本身仍遵循Perl的语法和语义。POSIX-style的头文件是pcreposix.h,所以,安装PCRE,需要运行以下命令。

sudo apt-get update 
sudo apt-get install libpcre3libpcre3-dev 

你可能还需要安装
sudo apt-get install openssllibssl-dev
 
原创粉丝点击