CentOS 7.0 安装pcre库

在虚拟机中部署了CentOS 7.0,而缺少pcre库(Perl Compatible Regular Expressions)是一个Perl库,包括 perl 兼容的正则表达式库。所以只好手动安装pcre库。

从官网下载pcre源码

20151121132116

上传到服务器的/usr/local/src目录下

20151121112504

解压pcre

20151121112731

切换到pcre目录下,进行编译

cd pcre-8.37
./configure --prefix=/usr/local/pcre-8.37 --libdir=/usr/local/lib/pcre --includedir=/usr/local/include/pcre
make && make install

20151121112929 20151121113031

 

查看对应的目录是否生成.

/usr/local/pcre-8.37
/usr/local/lib/pcre
/usr/local/include/pcre

20151121113200

 

更新动态链接库数据

echo "/usr/local/lib/pcre" >> /etc/ld.so.conf 
ldconfig -v

Author: jhonse

Jhonse技术博客: http://blog.jhonse.com

Leave a Reply

Your email address will not be published. Required fields are marked *