1. 发现问题
在 jetson orin nx
开发板上新装了系统测试,把其他 arm 系统中的 catkin_ws
整个拷贝过来了,但是在 catkin_make
时发生以下报错:
CMake Error at /opt/ros/noetic/share/catkin/cmake/assert.cmake:20 (message):
Assertion failed: file '/usr/lib/aarch64-linux-gnu/librt.so' does not
exist. Message: RT Library
Call Stack (most recent call first):
/opt/ros/noetic/share/catkin/cmake/tools/rt.cmake:44 (assert_file_exists)
/opt/ros/noetic/share/catkin/cmake/all.cmake:164 (include)
/opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
CMakeLists.txt:58 (find_package)
2. 解决问题
先在系统中查找一下 librt.so
:
locate librt.so
找到一个 /usr/lib/aarch64-linux-gnu/librt.so.1
。
那么将其软连接到正确位置:
sudo ln -s /usr/lib/aarch64-linux-gnu/librt.so.1 /usr/lib/aarch64-linux-gnu/librt.so
随后重新进行 catkin_make
操作,即可成功。