centos 编译错误:configure error required protobuf header file not found
这个错误通常是因为缺少 protobuf 的头文件。可以通过以下步骤来解决:
- 确认是否安装了 protobuf,如果没有安装,可以使用以下命令安装:
sudo yum install protobuf-devel
- 如果已经安装了 protobuf,查找 protobuf 的头文件路径:
sudo find / -name "protobuf.h"
- 将找到的头文件路径添加到环境变量中:
export CPLUS_INCLUDE_PATH=/path/to/protobuf/include:$CPLUS_INCLUDE_PATH
- 重新编译。
原文地址: https://www.cveoy.top/t/topic/b0r2 著作权归作者所有。请勿转载和采集!