我有这个问题:
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
我查了
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/