这个错误提示是因为系统缺少 protobuf 库,需要先安装 protobuf 库才能继续编译。可以使用 yum 命令安装:

sudo yum install protobuf protobuf-devel

如果还是出现类似的错误提示,可以尝试设置 PKG_CONFIG_PATH 环境变量,例如:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

或者设置 protobuf_CFLAGS 和 protobuf_LIBS 环境变量,例如:

export protobuf_CFLAGS="-I/usr/local/include" export protobuf_LIBS="-L/usr/local/lib -lprotobuf"

如果以上方法都不行,可以尝试手动编译安装 protobuf 库。

centos 编译错误:configure error Package requirements protobuf = 260 were not metNo package protobuf foundConsider adjusting the PKG_CONFIG_PATH environment variable if youinstalled software in a non-stand

原文地址: https://www.cveoy.top/t/topic/b0rC 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录