gpt4 book ai didi

c++ - 找不到 Protobuf(缺少 : Protobuf_PROTOC_EXECUTABLE)

转载 作者:行者123 更新时间:2023-12-01 13:49:11 28 4
gpt4 key购买 nike

当我在项目的构建目录中执行 cmake 时,出现此错误。最初我得到了一个

protobuf-config.cmake not found



错误。所以我给了一个protobuf-config.cmake文件的路径给Protobuf_DIR。后来它开始显示这个新错误:

CMake Error at /opt/cmake/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find Protobuf (missing: Protobuf_PROTOC_EXECUTABLE)

(found suitable version "3.6.1", minimum required is "3.0.0")



我还附上了错误日志文件:
https://drive.google.com/open?id=1y7BZ6lDBtxvla7r-o188xM_FjwLqwhCx

我在 Ubuntu-18 上使用 cmake 版本:3.13 和 protobuf 版本:3.6.1

最佳答案

您可能没有安装 Protobuf 编译器和开发文件。要解决此问题,请运行以下命令:

sudo apt-get install protobuf-compiler libprotobuf-dev

或者,如果您手动构建 Protobuf,则无法使用构建类型为 RelWithDebInfo 构建它。因为这会导致库和 CMake 出现问题。

关于c++ - 找不到 Protobuf(缺少 : Protobuf_PROTOC_EXECUTABLE),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55039756/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com