ROS2 中出现 librcl_logging_spdlog.so: undefined symbol 的临时处理
通过下载压缩包的方式安装,一开始source的是安装包目录下的setup.bash,可以运行turtlesim
安装navigation2后,出现了
Caught exception when trying to load file of format [py]: /opt/ros/galactic/lib/librcl_logging_spdlog.so: undefined symbol: ···················
检查后发现:
locate librcl_logging_spdlog.so
/home/user/ros2_galactic/ros2-linux/lib/librcl_logging_spdlog.so
/opt/ros/galactic/lib/librcl_logging_spdlog.so
发现存在两个spdlog.so
将/opt/ros 内的librcl_logging_spdlog.so备份,复制压缩包内的librcl_logging_spdlog.so到/opt/ros内:
ls librcl_logging_spdlog.so* -l
-rw-r--r-- 1 root root 482632 Sep 5 20:53 librcl_logging_spdlog.so
-rw-r--r-- 1 root root 35352 Jul 1 06:15 librcl_logging_spdlog.so.bak
可见两文件的大小存在差异。结合:
https://github.com/ros2/rcl_logging/issues/34
https://answers.ros.org/question/380917/ros2-run-turtlesim-symbol-lookup-error/
可以认为是在安装的时候有概率出现librcl_logging_spdlog.so被损坏。再复制压缩包内的so文件到/opt后,能够正常运行。
posted on 2021-09-05 21:15 kitakazePOI 阅读(1235) 评论(0) 编辑 收藏 举报