linux安装pcre错误,安装PCRE时出错
問題描述
我正在嘗試在我的Ubuntu 11.10服務(wù)器上安裝PCRE。當(dāng)我運行”make”命令時,我得到一個非常長的輸出,它始終以此錯誤結(jié)束:
libtool: link: ( cd ".libs" && rm -f "libpcreposix.la" && ln -s "../libpcreposix.la" "libpcreposix.la" ) source='pcrecpp.cc' object='pcrecpp.lo' libtool=yes \
DEPDIR=.deps depmode=none /bin/bash ./depcomp \
/bin/bash ./libtool --tag=CXX --mode=compile -DHAVE_CONFIG_H -I. -c -o pcrecpp.lo pcrecpp.cc libtool: compile: unrecognized option `-DHAVE_CONFIG_H' libtool: compile: Try `libtool
--help' for more information. make[1]: *** [pcrecpp.lo] Error 1 make[1]: Leaving directory `/home/root/src/pcre/pcre-8.12' make:
*** [all] Error 2
我確實運行了”configure”。有任何想法嗎?
最佳解決思路
您需要安裝C++編譯器,您很可能需要g ++。
使用apt-get,運行’apt-get install g ++’,或’apt-get安裝build-essential’,因為build-essential包含g ++。
次佳解決思路
PCRE嘗試在沒有c ++編譯器的情況下構(gòu)建c ++輸出。嘗試
./configure --disable-cpp
禁用C++選項。
第三種解決思路
為什么不使用apt-cache search pcre | grep pcre找到PCRE,然后使用apt-get install來安裝PCRE?我認(rèn)為PCRE已經(jīng)包含在存儲庫中。
這是我的計算機(Ubuntu 10.04)中上述命令的結(jié)果:
$ apt-cache search pcre | grep pcre
libpcre3-dbg - Perl 5 Compatible Regular Expression Library - debug symbols
libpcre3-dev - Perl 5 Compatible Regular Expression Library - development files
libpcrecpp0 - Perl 5 Compatible Regular Expression Library - C++ runtime files
libpcre3 - Perl 5 Compatible Regular Expression Library - runtime files
cl-ppcre - Portable Regular Express Library for Common Lisp
gambas2-gb-pcre - The Gambas regexp component
haskell-pcre-light-doc - library documentation for pcre-light
libghc6-pcre-light-dev - Haskell library for Perl 5-compatible regular expressions
libghc6-pcre-light-prof - pcre-light library with profiling enabled
liblua5.1-rex-pcre-dev - PCRE development files for the Lua language version 5.1
liblua5.1-rex-pcre0 - Perl regular expressions library for the Lua language version 5.1
libpcre++-dev - C++ wrapper class for pcre (development)
libpcre++0 - C++ wrapper class for pcre (runtime)
libpcre-ocaml - OCaml bindings for PCRE (runtime)
libpcre-ocaml-dev - OCaml bindings for PCRE (Perl Compatible Regular Expression)
pcregrep - grep utility that uses perl 5 compatible regexes.
pike7.6-pcre - PCRE module for Pike
sqlite3-pcre - Perl-compatible regular expression support for SQLite
postfix-pcre - PCRE map support for Postfix
第四種思路
我遇到了同樣的問題,解決方案是在其他答案中做一切建議并安裝PCRE的開發(fā)文件:
apt-get安裝build-essential
apt-get安裝libtool
apt-get安裝libpcre3-dev
apt-get安裝libpcre3
參考資料
總結(jié)
以上是生活随笔為你收集整理的linux安装pcre错误,安装PCRE时出错的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【Linux 内核 内存管理】物理分配页
- 下一篇: HTML5网页小游戏(HTML5、CSS