bazel成功安装后,编译代码报错

官方地址:https://docs.bazel.build/versions/master/install-ubuntu.html

xuqiong@qbb-linux:~/code/tensorflow/tensorflow$ bazel build tensorflow/tools/graph_transforms:transform_graph

Starting local Bazel server and connecting to it...

INFO: Invocation ID: dc52de81-0466-4b7d-83b6-b20f45515cc6

ERROR: /home/xuqiong/.cache/bazel/_bazel_xuqiong/365a5ad7cdef4dd527f540187513ea75/external/io_bazel_rules_closure/closure/protobuf/closure_proto_library.bzl:66:21: name 'ProtoInfo' is not defined (did you mean 'protos'?)

ERROR: error loading package '': in /home/xuqiong/.cache/bazel/_bazel_xuqiong/365a5ad7cdef4dd527f540187513ea75/external/io_bazel_rules_closure/closure/defs.bzl: Extension 'closure/protobuf/closure_proto_library.bzl' has errors

ERROR: error loading package '': in /home/xuqiong/.cache/bazel/_bazel_xuqiong/365a5ad7cdef4dd527f540187513ea75/external/io_bazel_rules_closure/closure/defs.bzl: Extension 'closure/protobuf/closure_proto_library.bzl' has errors

INFO: Elapsed time: 7.224s

INFO: 0 processes.

FAILED: Build did NOT complete successfully (0 packages loaded)

将bazel更新成最新:

sudo apt-get upgrade bazel

猜你喜欢

转载自blog.csdn.net/weixin_41770169/article/details/90041269