Подтвердить что ты не робот

Ошибка при установке PCRE

Я пытаюсь установить PCRE на моем сервере Ubuntu 11.10. Когда я запускаю команду "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

Я выполнил "configure". Любые идеи?

4b9b3361

Ответ 1

Вам нужен С++-компилятор, вы, скорее всего, захотите g++.

С apt-get запустите 'apt-get install g++' или 'apt-get install build-essential', поскольку build-essential включает g++.

Ответ 2

PCRE пытается построить вывод С++ без компилятора С++. Попробуйте

./configure --disable-cpp 

чтобы отключить параметры С++.

Ответ 3

Почему бы не найти PCRE с помощью apt-cache search pcre | grep pcre, а затем использовать 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

Ответ 4

У меня была такая же проблема, и решение заключалось в том, чтобы сделать все, что было предложено в других ответах, и установить файлы разработки для PCRE:

  • apt-get install build-essential
  • apt-get install libtool
  • apt-get install libpcre3-dev
  • apt-get install libpcre3

Ответ 5

Чтобы установить пакет pcre, вам нужно запустить 2 команды:

  • apt-get install libpcre3 libpcre3-dev
  • apt-get install build-essential libpcre3-dev libxslt1-dev libgd2-xpm-dev libgeoip-dev libssl-dev

Ответ 6

Я нашел ответ, почему, но не лекарство; (я знаю, что это старый вопрос, но я думал, что буду участвовать в любом случае).

Я обнаружил, что 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

У меня нет большой идеи, почему это происходит, но работа над поиском! Надеюсь, это ответит на ваш вопрос.