30

Ubuntu 11.10 サーバーに PCRE をインストールしようとしています。「make」コマンドを実行すると、非常に長い出力が得られ、常にこのエラーで終了します。

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

「構成」を実行しました。何か案は?

4

7 に答える 7

25

C++コンパイラをインストールする必要があります。おそらくg++が必要です。

build-essentialにはg++が含まれているため、apt-getを使用して、「apt-getinstallg++」または「apt-getinstallbuild-essential」を実行します。

于 2011-11-28T09:34:38.120 に答える
15

PCRE は、c++ コンパイラを使用せずに c++ 出力をビルドしようとします。試す

./configure --disable-cpp 

C++ オプションを無効にします。

于 2013-02-14T11:10:58.390 に答える
8

apt-cache search pcre | grep pcrePCRE を使用して見つけ、それを使用apt-get installして PCRE をインストールしてみませんか? PCRE はすでにリポジトリに含まれていると思います。

これは、私のコンピューター (Ubuntu 10.04) で上記のコマンドを実行した結果です。

$ 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
于 2012-01-29T09:32:31.350 に答える
8

私は同じ問題を抱えていましたが、解決策は、他の回答で提案されているすべてを実行し、PCREの開発ファイルをインストールすることでした:

  1. apt-get インストール ビルド必須
  2. apt-get インストール libtool
  3. apt-get インストール libpcre3-dev
  4. apt-get インストール libpcre3
于 2012-07-27T10:44:53.370 に答える
1

パッケージをインストールするpcreには、次の 2 つのコマンドを実行する必要があります。

  1. apt-get install libpcre3 libpcre3-dev
  2. apt-get install build-essential libpcre3-dev libxslt1-dev libgd2-xpm-dev libgeoip-dev libssl-dev
于 2016-10-25T13:38:30.737 に答える
0

理由についての答えは見つかりましたが、治療法は見つかりませんでした。(これは古い質問であることは知っていますが、とにかく貢献すると思いました)。

pcre がシステムに既にインストールされていることがわかりましたが、明らかにlibtool はインストールされていませんでした。Sudo apt-get install libtool を試みたとき、私は得ました

Package libtool is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

これがなぜ起こっているのかについてはよくわかっていませんが、調査に取り組んでいます。これがあなたの質問に答えることを願っています。

于 2012-05-08T20:19:39.177 に答える