码迷,mamicode.com
首页 > 其他好文 > 详细

grep: this version of PCRE is not compiled with PCRE_UTF8 support

时间:2016-07-04 12:03:45      阅读:458      评论:0      收藏:0      [点我收藏+]

标签:grep: this version of pcre is not compiled with pcre_utf8 support

前言:

         公司服务器在迁移之后出现了问题,在grep使用正则表达式的时候老是提示grep: this version of PCRE is not compiled with PCRE_UTF8 support,pcre是正则表达式的函数库,使如果不改正,很烦人。我是源码安装的。所以重新编译的时候加上支持utf-8的选项就可以了。

步骤:

(1)卸载prce

       假如是rpm包,直接rpm -qa | grep prce 或rpm -e pcre --nodeps 就可以了,我这边用的是源码包编译安装的。

[root@rsync pcre]# cd /pcre

[root@rsync pcre]# make uninstall

(2)查看支持uts-8的可选项是什么

[root@rsync pcre]# cd /pcre

[root@rsync pcre]# ./configure --help

技术分享

(3)重新编译

[root@rsync pcre]# ./configure  --enable-utf8

[root@rsync pcre]# make && make install

(4)验证

这是没加的时候

技术分享

这是重新编译后的,不会再显示那一行

技术分享


本文出自 “庭中有奇树” 博客,请务必保留此出处http://zhangdl.blog.51cto.com/11050780/1795507

grep: this version of PCRE is not compiled with PCRE_UTF8 support

标签:grep: this version of pcre is not compiled with pcre_utf8 support

原文地址:http://zhangdl.blog.51cto.com/11050780/1795507

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!