热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Centos6.编译安装pcre时出现的问题及完美解决

文章目录编译安装pcre-8.34时出现的问题1、-bash:.configure:权限不够2、rpm包安装pcre卸载后的nodeps参数问题,导致.configu

文章目录

  • 编译安装pcre-8.34时出现的问题
    • 1、-bash: ./configure: 权限不够
    • 2、rpm包安装pcre卸载后的nodeps参数问题,导致./configure出现问题,进而没有makefile文件,不能make
    • 3、make时出现问题


编译安装pcre-8.34时出现的问题

1、-bash: ./configure: 权限不够

解决:chmod增加x执行权限
在这里插入图片描述

[root@localhost pcre-8.34]# ./configure
-bash: ./configure: 权限不够
[root@localhost pcre-8.34]# chmod +x ./configure

2、rpm包安装pcre卸载后的nodeps参数问题,导致./configure出现问题,进而没有makefile文件,不能make

解决:grep依赖pcre, 得先安装一个老版本的pcre,才能编译新版的pcre

在这里插入图片描述

checking how to run the C preprocessor... grep: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory
gcc -E
grep: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory
checking for grep that handles long lines and -e... configure: error: no acceptable grep could be found in /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/xpg4/bin
[root@localhost pcre-8.34]# make
make: *** 没有指明目标并且找不到 makefile。 停止。

rpm包安装低版本的pcre:
在这里插入图片描述安装完成后./configure正常
在这里插入图片描述

3、make时出现问题

[root@localhost pcre-8.35]# make
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /lamp/pcre-8.35/missing aclocal-1.14 -I m4
/lamp/pcre-8.35/missing: line 81: aclocal-1.14: command not found
WARNING: &#39;aclocal-1.14&#39; is missing on your system.You should only need it if you modified &#39;acinclude.m4&#39; or&#39;configure.ac&#39; or m4 files included by &#39;configure.ac&#39;.The &#39;aclocal&#39; program is part of the GNU Automake package:<http://www.gnu.org/software/automake>It also requires GNU Autoconf, GNU m4 and Perl in order to run:<http://www.gnu.org/software/autoconf><http://www.gnu.org/software/m4/><http://www.perl.org/>
make: *** [aclocal.m4] 错误 127

在这里插入图片描述
解决&#xff1a;

[root&#64;localhost pcre-8.35]# autoreconf -ivf
autoreconf: Entering directory &#96;.&#39;
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in &#96;
.&#39;.
libtoolize: copying file &#96;./ltmain.sh&#39;
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, &#96;
m4&#39;
.
libtoolize: copying file &#96;m4/libtool.m4&#39;
libtoolize: copying file &#96;
m4/ltoptions.m4&#39;
libtoolize: copying file &#96;m4/ltsugar.m4&#39;
libtoolize: copying file &#96;
m4/ltversion.m4&#39;

libtoolize: copying file &#96;m4/lt~obsolete.m4&#39;
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
autoreconf: Leaving directory &#96;
.&#39;

之后的安装就正常了

在这里插入图片描述


推荐阅读
author-avatar
许小晴晴原_890
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有