0

在 linux 中通过终端运行输入视频以进行 mediapipe handtracking 时出现错误。请帮助我。因为我的项目时间不多了。我正在使用 Bazel 4.0.0 Mediapipe 手部跟踪 linux 18.04

错误

bazel-out/host/bin/external/com_google_protobuf/protoc '--python_out=bazel-out/k8-fastbuild/bin/external/com_google_protobuf/python' -Iexternal/com_google_protobuf/python -Ibazel-out/k8-fastbuild/bin /external/com_google_protobuf/python bazel-out/k8-fastbuild/bin/external/com_google_protobuf/python/google/protobuf/any.proto) 信息:来自 ProtoCompile external/com_google_protobuf/python/google/protobuf/api_pb2.py:external/ com_google_protobuf/python:警告:目录不存在。信息:来自 ProtoCompile external/com_google_protobuf/python/google/protobuf/type_pb2.py:external/com_google_protobuf/python:警告:目录不存在。信息:来自 ProtoCompile external/com_google_protobuf/python/google/protobuf/duration_pb2.py:external/com_google_protobuf/python:警告:目录不存在。信息:来自 ProtoCompile external/com_google_protobuf/python/google/protobuf/compiler/plugin_pb2.py:external/com_google_protobuf/python:警告:目录不存在。信息:来自 ProtoCompile external/com_google_protobuf/python/google/protobuf/descriptor_pb2.py:external/com_google_protobuf/python:警告:目录不存在。信息:来自 ProtoCompile external/com_google_protobuf/python/google/protobuf/struct_pb2.py:external/com_google_protobuf/python:警告:目录不存在。信息:来自 ProtoCompile external/com_google_protobuf/python/google/protobuf/field_mask_pb2.py:external/com_google_protobuf/python:警告:目录不存在。信息:来自 ProtoCompile external/com_google_protobuf/python/google/protobuf/timestamp_pb2.py:external/com_google_protobuf/python:警告:目录不存在。信息:

mediapipe/mediapipe/calculators/tensor/BUILD:594:11:编译 mediapipe/calculators/tensor/image_to_tensor_converter_opencv.cc 失败:(退出 1):gcc 失败:错误执行命令 /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector - Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ...(剩余 61 个参数(s ) 跳过)

使用 --sandbox_debug 查看来自沙箱 gcc 的详细消息失败:执行命令时出错 /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-省略帧指针 -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ...(剩余 61 个参数被跳过)

使用 --sandbox_debug 查看来自沙盒 mediapipe/calculators/tensor/image_to_tensor_converter_opencv.cc 的详细消息:在成员函数 'virtual absl::lts_2020_09_23::StatusOrmediapipe::Tensor mediapipe::{anonymous}::OpenCvProcessor::Convert(const mediapipe::Image&, const mediapipe::RotatedRect&, const mediapipe::Size&, float, float)': mediapipe/calculators/tensor/image_to_tensor_converter_opencv.cc:106:12: 错误:无法从'mediapipe:: 转换'张量' Tensor' 到 'absl::lts_2020_09_23::StatusOrmediapipe::Tensor' 返回张量;^~~~~~

4

1 回答 1

0

这与您的编译器版本有关。将您的 gcc 版本升级到 8 或更高版本。它会起作用的。

于 2021-03-12T21:11:27.143 回答