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

文章目录

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

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

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

解决:chmod增加x执行权限
Centos6.编译安装pcre时出现的问题及完美解决_第1张图片

[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

Centos6.编译安装pcre时出现的问题及完美解决_第2张图片

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:
Centos6.编译安装pcre时出现的问题及完美解决_第3张图片安装完成后./configure正常
Centos6.编译安装pcre时出现的问题及完美解决_第4张图片

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: 'aclocal-1.14' is missing on your system.
         You should only need it if you modified 'acinclude.m4' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'aclocal' 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

Centos6.编译安装pcre时出现的问题及完美解决_第5张图片
解决:

[root@localhost pcre-8.35]# autoreconf -ivf
autoreconf: Entering directory `.'
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 `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
autoreconf: Leaving directory `.'

之后的安装就正常了

Centos6.编译安装pcre时出现的问题及完美解决_第6张图片

你可能感兴趣的:(服务器运维—Linux,排错,pcre,centos,6,排错)