编译 cartographer_ros 出现 CMake Error: The following variables are used in this project, but they are..

编译 cartographer_ros 出现 CMake Error: The following variables are used in this project, but they are set to NOTFOUND.(2021.02.22)

ubuntu版本:20.04
ros版本:noetic

出现如下问题:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
GMOCK_LIBRARY
    linked by target "time_conversion_test" in directory /home/mckros/catkin_ws/src/cartographer_ros/cartographer_ros
    linked by target "time_conversion_test" in directory /home/mckros/catkin_ws/src/cartographer_ros/cartographer_ros
    linked by target "msg_conversion_test" in directory /home/mckros/catkin_ws/src/cartographer_ros/cartographer_ros
    linked by target "msg_conversion_test" in directory /home/mckros/catkin_ws/src/cartographer_ros/cartographer_ros
    linked by target "metrics_test" in directory /home/mckros/catkin_ws/src/cartographer_ros/cartographer_ros
    linked by target "metrics_test" in directory /home/mckros/catkin_ws/src/cartographer_ros/cartographer_ros
    linked by target "configuration_files_test" in directory /home/mckros/catkin_ws/src/cartographer_ros/cartographer_ros
    linked by target "configuration_files_test" in directory /home/mckros/catkin_ws/src/cartographer_ros/cartographer_ros

-- Configuring incomplete, errors occurred!
See also "/home/mckros/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/mckros/catkin_ws/build/CMakeFiles/CMakeError.log".
make: *** [Makefile:4520:cmake_check_build_system] 错误 1
Invoking "make cmake_check_build_system" failed

问题提示说:没有找到GMOCK_LIBRARY包
笔者是按照Ubuntu 18.04 安装cartographer方法安装的。

问题解决:
我尝试过使用sudo apt install google-mock安装GMOCK 但是它依旧提示上面的问题。但是我发现我使用 sudo apt install libgmock-dev,他安装了一些包,接下来catkin_make可以发现编译成功

结语

本文也是基于笔者的学习和使用经验总结的,主观性较强,如果有哪些不对的地方或者不明白的地方,欢迎评论区留言交流~

✌Bye

Reference
https://ask.youkuaiyun.com/questions/7392012

评论 19
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

锡城筱凯

你的鼓励是我创造的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值