meshcat_visualizer_test 无法获取存储库 'yaml_cpp'

meshcat_visualizer_test fails fetching repository 'yaml_cpp'

我正在尝试 运行 drake/bindings/pydrake/systems/test/meshcat_visualizer_test.py 按照所述文件顶部的注释说明,但我不熟悉如何添加 yaml-ccp,我相信会导致错误。我克隆了 drake 存储库并配置了 pydrake,并且能够 运行 服务器(第一个必需的命令),但不知道如何添加缺少的 yaml-cpp 包。

phil@philpc:~/drake/bindings/pydrake/systems/test$ bazel run --run_under='env TEST_ZMQ_URL=tcp://127.0.0.1:6000' //bindings/pydrake/systems:py/meshcat_visualizer_test -- 'TestMeshcat.test_point_cloud_visualization'
INFO: Repository yaml_cpp instantiated at:
  no stack (--record_rule_instantiation_callstack not enabled)
Repository rule pkg_config_repository defined at:
  /home/phil/drake/tools/workspace/pkg_config.bzl:276:25: in <toplevel>
ERROR: An error occurred during the fetch of repository 'yaml_cpp':
   Unable to complete pkg-config setup for @yaml_cpp repository: error 1 from [/usr/bin/pkg-config, "yaml-cpp"]: 
INFO: Repository remotejdk11_linux instantiated at:
  no stack (--record_rule_instantiation_callstack not enabled)
Repository rule http_archive defined at:
  /home/phil/.cache/bazel/_bazel_phil/a5ca8dfa5bc97606d4bf1d23312635a2/external/bazel_tools/tools/build_defs/repo/http.bzl:336:16: in <toplevel>
INFO: Repository remote_java_tools_linux instantiated at:
  no stack (--record_rule_instantiation_callstack not enabled)
Repository rule http_archive defined at:
  /home/phil/.cache/bazel/_bazel_phil/a5ca8dfa5bc97606d4bf1d23312635a2/external/bazel_tools/tools/build_defs/repo/http.bzl:336:16: in <toplevel>
INFO: Repository fmt instantiated at:
  no stack (--record_rule_instantiation_callstack not enabled)
Repository rule _github_archive_real defined at:
  /home/phil/drake/tools/workspace/github.bzl:102:24: in <toplevel>
INFO: Repository lcm instantiated at:
  no stack (--record_rule_instantiation_callstack not enabled)
Repository rule _github_archive_real defined at:
  /home/phil/drake/tools/workspace/github.bzl:102:24: in <toplevel>
ERROR: /home/phil/drake/tools/install/libdrake/BUILD.bazel:251:1: //tools/install/libdrake:libdrake_runtime_so_deps depends on @yaml_cpp//:yaml_cpp in repository @yaml_cpp which failed to fetch. no such package '@yaml_cpp//': Unable to complete pkg-config setup for @yaml_cpp repository: error 1 from [/usr/bin/pkg-config, "yaml-cpp"]: 
ERROR: Analysis of target '//bindings/pydrake/systems:py/meshcat_visualizer_test' failed; build aborted: no such package '@yaml_cpp//': Unable to complete pkg-config setup for @yaml_cpp repository: error 1 from [/usr/bin/pkg-config, "yaml-cpp"]: 
INFO: Elapsed time: 0.515s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (6 packages loaded, 0 targets configured)
FAILED: Build did NOT complete successfully (6 packages loaded, 0 targets configured)

在命令行上尝试运行 /usr/bin/pkg-config yaml-cpp --libs,看看会发生什么。它应该不会报告任何错误,只打印 -lyaml-cpp.

您是否使用https://drake.mit.edu/ubuntu.html 命令安装了 Drake 的依赖项?那时它应该已经安装了 libyaml-cpp-dev,这应该是 pkg-config 成功所需的全部。