Ошибка: требования пакета (libprotobuf-c> = 1.0.1) не были выполнены - PullRequest
1 голос
/ 25 апреля 2019

Я использую protobuf-c от GitHub. Когда я запускаю make, возникает эта ошибка.

$ git clone https://github.com/protobuf-c/protobuf-c.git
Cloning into 'protobuf-c'...
$ cd protobuf-c
$ ./autogen.sh
...

А потом:

$ ./configure
...

checking whether g++ supports C++11 features with -std=c++11... yes
checking for protobuf... no
checking for protobuf... no
configure: error: Package requirements (libprotobuf-c >= 1.0.1) were not met:
No package 'libprotobuf-c' found

Consider adjusting the `PKG_CONFIG_PATH` environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables `libprotobuf_c_CFLAGS`
and `libprotobuf_c_LIBS` to avoid the need to call pkg-config.
See the pkg-config man page for more details.
make: *** [config.status] Erreur 1

В чем проблема и как ее исправить?

1 Ответ

0 голосов
/ 25 апреля 2019

Как я могу исправить эту ошибку конфигурации о libprotobuf-c?
configure: error: требования пакета (libprotobuf-c> = 1.0.1) не были выполнены ...

Убедитесь, что у вас установлены эти предварительные условия. README.md не перечисляет их.

Пакеты для Ubuntu:

  • libprotobuf-DEV
  • libprotoc-DEV
  • Protobuf-составитель

Пакеты для Fedora:

  • Protobuf-разви
  • Protobuf-составитель

Если вам не хватает libprotobuf-dev, то вы получите ошибку:

configure: error: Package requirements (protobuf >= 2.6.0) were not met...

Если вам не хватает libprotoc-dev, то вы получите ошибку:

checking for google/protobuf/compiler/command_line_interface.h:
configure: error: required protobuf header file not found

Если вам не хватает protobuf-compiler, то вы получите ошибку:

configure: error: Please install the protobuf compiler from
https://code.google.com/p/protobuf/

С установленными предварительными требованиями вы должны успешно настроить сводку, такую ​​как:

configure: creating ./config.status
config.status: creating Makefile
config.status: creating protobuf-c/libprotobuf-c.pc
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands

protobuf-c 1.3.1

    CC:                     gcc
    CFLAGS:                 -g -O2
    CXX:                    g++ -std=c++11
    CXXFLAGS:               -g -O2
    LDFLAGS:
    LIBS:

    prefix:                 /usr/local
    sysconfdir:             ${prefix}/etc
    libdir:                 ${exec_prefix}/lib
    includedir:             ${prefix}/include
    pkgconfigdir:           ${libdir}/pkgconfig

    bigendian:              no
    protobuf version:       libprotoc 3.0.0
...