Makefile:138: recipe for target 'all' failed make: *** [all] Error 2

ROS中出现这种情况,看下是不是功能包中的路径没有设置好,打开该功能包的CMakeLists.txt,编辑

## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
  #include
  ${catkin_INCLUDE_DIRS}

)

改成下面的(去掉include前的注释#)

 

## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
   include
  ${catkin_INCLUDE_DIRS}

)

再进去cd ~/catkin_ws/

然后catkin_make,进行编译,即可成功。这可能是一种方法。


 

你可能感兴趣的:(Ros)