最初,我在/usr/
中有pcl-1.10
(使用sudo apt install libpcl-dev
安装)。然后出于某种原因,我在/usr/local/
中自建了pcl-1.12
。现在我使用sudo make uninstall
卸载了pcl-1.12
,并希望使用默认的pcl-1.10
。但当我编译项目时,错误消息显示
$ colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release Starting >>> lidarslam_msgs Starting >>> ndt_omp_ros2 --- stderr: ndt_omp_ros2 make[2]: *** No rule to make target '/usr/local/lib/libpcl_surface.so', needed by 'align'. Stop. make[1]: *** [CMakeFiles/Makefile2:80: CMakeFiles/align.dir/all] Error 2 make: *** [Makefile:141: all] Error 2 --- Failed <<< ndt_omp_ros2 [0.16s, exited with code 2]
即使我卸载了包,PATH仍然指向/usr/local/lib
。有没有方法可以将PATH重置为全局包路径?对于这种情况,我认为pcl-1.10
的libpcl_surface.so
在/usr/lib/x86_64-linux-gnu/libpcl_outofcore.so
中。
我正在研究ROS2,并使用colcon
编译CMakeList.txt。所以我不能修改makefile。我认为这是路径问题。
一种方法是使用符号链接将/usr/lib/x86_64-linux-gnu/
中的所有.so文件链接到/usr/local/lib
,但我发现这有点愚蠢。。。