ubuntu - 未找到时间戳 proto 和其他 proto 文件,即使它们存在于/usr/local/bin/include/google/protobuf

标签 ubuntu protocol-buffers

我有这个问题:

grpc_tools._protoc_compiler.ProtocErrors: google/protobuf/timestamp.proto:-1:0 error: File not found.
google/protobuf/any.proto:-1:0 error: File not found.
google/protobuf/field_mask.proto:-1:0 error: File not found.
google/protobuf/duration.proto:-1:0 error: File not found.
它确实在这里:
usr/local/bin/include/google/protobuf
inside the protobuf folder
我查了sudo which protoc ,它给了我:
/usr/local/bin/protoc
我正在使用 Ubuntu 20.04。有人有想法吗?非常感谢!

最佳答案

目录应该是:/usr/local/include 不是 /usr/local/bin/include

NOTE because protoc has a pretty rapid release velocity, I've always tended to just download it to project directories and path it from there... e.g. PATH=${PATH}:${PWD}/protoc-${VERS}-${ARCH}/bin.

关于ubuntu - 未找到时间戳 proto 和其他 proto 文件,即使它们存在于/usr/local/bin/include/google/protobuf,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68166530/

相关文章:

python - 如何在 Ubuntu 20.04 中安装 python3-dev?

java - 在 IntelliJ 中使用 Gradle 导入 Protobuf 生成的类

python - 获得 fastpython protobuf 支持的问题

linux - 如何在 Bash 脚本中发送身份验证详细信息?

mongodb - 为什么 mongorestore 非常缓慢?

linux - 用于 ubuntu 的 Visual Studio、xamarin、sql server

ubuntu - cmake & Qt5 : qmake reported QT_INSTALL_LIBS as XXX but QtCore could not be found there

go - 如何将 Struct 转换/转换为 Protobuf?

protocol-buffers - Protocol Buffer 作为 JMS 上的消息

c++ - 在 64 位应用程序中编码 protobuf 消息并在 32 位应用程序中解码是否有效?