首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >错误:未满足包要求(libprotobuf c >= 1.0.1)

错误:未满足包要求(libprotobuf c >= 1.0.1)
EN

Stack Overflow用户
提问于 2019-04-25 15:58:43
回答 1查看 2.7K关注 0票数 1

我正在使用来自GitHub的GitHub。当我运行时,会发生此错误。

代码语言:javascript
复制
$ git clone https://github.com/protobuf-c/protobuf-c.git
Cloning into 'protobuf-c'...
$ cd protobuf-c
$ ./autogen.sh
...

然后:

代码语言:javascript
复制
$ ./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

有什么问题,我该如何解决?

EN

回答 1

Stack Overflow用户

发布于 2019-04-25 19:52:13

如何修复libprotobuf c的配置错误? 配置:错误:未满足包要求(libprotobuf c >= 1.0.1)

确保安装了这些先决条件。README.md没有列出它们。

Ubuntu的软件包是:

  • libprotobuf dev
  • libprotoc dev
  • 原编译器

Fedora的套餐如下:

  • 原始人
  • 原编译器

如果您缺少libprotobuf-dev,则会得到以下错误:

配置:错误:未满足包要求(protobuf >= 2.6.0)。

如果您缺少libprotoc-dev,则会得到以下错误:

检查google/protobuf/compiler/command_line_interface.h:配置:错误:未找到所需的原型头文件

如果您缺少protobuf-compiler,则会得到以下错误:

配置:错误:请从https://code.google.com/p/protobuf/安装原型编译器

安装了prereqs之后,您应该成功地配置一个摘要,如下所示:

代码语言:javascript
复制
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
票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55853361

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档