天天看點

Centos6.編譯安裝pcre時出現的問題及完美解決編譯安裝pcre-8.34時出現的問題

文章目錄

  • 編譯安裝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時出現的問題及完美解決編譯安裝pcre-8.34時出現的問題
[[email protected] pcre-8.34]# ./configure
-bash: ./configure: 權限不夠
[[email protected] pcre-8.34]# chmod +x ./configure
           

2、rpm包安裝pcre解除安裝後的nodeps參數問題,導緻./configure出現問題,進而沒有makefile檔案,不能make

解決:grep依賴pcre, 得先安裝一個老版本的pcre,才能編譯新版的pcre

Centos6.編譯安裝pcre時出現的問題及完美解決編譯安裝pcre-8.34時出現的問題
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
[[email protected] pcre-8.34]# make
make: *** 沒有指明目标并且找不到 makefile。 停止。

           

rpm包安裝低版本的pcre:

Centos6.編譯安裝pcre時出現的問題及完美解決編譯安裝pcre-8.34時出現的問題

安裝完成後./configure正常

Centos6.編譯安裝pcre時出現的問題及完美解決編譯安裝pcre-8.34時出現的問題

3、make時出現問題

[[email protected] 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時出現的問題及完美解決編譯安裝pcre-8.34時出現的問題

解決:

[[email protected] 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時出現的問題及完美解決編譯安裝pcre-8.34時出現的問題

繼續閱讀