在Ubuntu或者Debian中安装PCRE库( Perl 5 Compatible Regu

I need to compile few application and I need Perl 5 Compatible Regular Expression Library (PCRE). Under CentOS I can use a package called pcre-devel, but Debian do not have the same. How do I install pcre-devel under Debian / Ubuntu Linux?

我需要编译一些应用程序,同时也需要Perl 5 兼容正则表达式库(PCRE)。在CentOs下,我可以使用一个叫pcre-devel,但是Debian可就不一样了。我怎样在Debian/Ubuntu  Linux下安装pcre-devel呢?

Perl-compatible regular expression library. PCRE has its own native API, but a set of “wrapper” functions that are based on the POSIX API are also supplied in the library libpcreposix. Note that this just provides a POSIX calling interface to PCRE: the regular expressions themselves still follow Perl syntax and semantics. The header file for the POSIX-style functions is called pcreposix.h. To install PCRE, type thy following command:

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

sudo apt-get update
sudo apt-get install libpcre3 libpcre3-dev

你可能还需要安装
sudo apt-get install openssl libssl-dev

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wyzfzj.html