标签: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