文章目录
- 编译安装pcre-8.34时出现的问题
- 1、-bash: ./configure: 权限不够
- 2、rpm包安装pcre卸载后的nodeps参数问题,导致./configure出现问题,进而没有makefile文件,不能make
- 3、make时出现问题
编译安装pcre-8.34时出现的问题
1、-bash: ./configure: 权限不够
解决:chmod增加x执行权限
![在这里插入图片描述](https://img8.php1.cn/3cdc5/15f90/1c8/f284c879502f9f68.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxOTU5ODk5,size_16,color_FFFFFF,t_70)
[root@localhost pcre-8.34]
-bash: ./configure: 权限不够
[root@localhost pcre-8.34]
2、rpm包安装pcre卸载后的nodeps参数问题,导致./configure出现问题,进而没有makefile文件,不能make
解决:grep依赖pcre, 得先安装一个老版本的pcre,才能编译新版的pcre
![在这里插入图片描述](https://img8.php1.cn/3cdc5/15f90/1c8/34328f6ea7f2f95c.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxOTU5ODk5,size_16,color_FFFFFF,t_70)
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: *** 没有指明目标并且找不到 makefile。 停止。
rpm包安装低版本的pcre:
安装完成后./configure正常
![在这里插入图片描述](https://img8.php1.cn/3cdc5/15f90/1c8/5c964cf675bea505.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxOTU5ODk5,size_16,color_FFFFFF,t_70)
3、make时出现问题
[root@localhost pcre-8.35]
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
![在这里插入图片描述](https://img8.php1.cn/3cdc5/15f90/1c8/15f8b8f686242a2d.png?x-oss-process&#61;image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxOTU5ODk5,size_16,color_FFFFFF,t_70)
解决&#xff1a;
[root&#64;localhost pcre-8.35]
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;
之后的安装就正常了
![在这里插入图片描述](https://img8.php1.cn/3cdc5/15f90/1c8/80f8caf0a06207ff.png?x-oss-process&#61;image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxOTU5ODk5,size_16,color_FFFFFF,t_70)