ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

ros kinetic opencv2 dependency not found

asked 2017-06-28 04:38:08 -0500

HHG gravatar image

i went to ~/catkin_ws(my workspace) and then to src folder and created my package with the command

catkin_create_pkg face sensor_msgs opencv2 cv_bridge rospy std_msgs

The package was successfully created.Then i went to catkin_ws and executed the command


it showed an error

CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package): Could not find a package configuration file provided by "opencv2" with any of the following names:


Add the installation prefix of "opencv2" to CMAKE_PREFIX_PATH or set "opencv2_DIR" to a directory containing one of the above files. If "opencv2" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): face/CMakeLists.txt:10 (find_package)

-- Configuring incomplete, errors occurred! See also "/home/hari/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/hari/catkin_ws/build/CMakeFiles/CMakeError.log". Makefile:738: recipe for target 'cmake_check_build_system' failed make: * [cmake_check_build_system] Error 1 Invoking "make cmake_check_build_system" failed

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-06-30 07:59:37 -0500

vignesh gravatar image

Well, it could not detect OpenCV2 package in ROS Kinetic version because kinetic has an OpenCV3 package in their Debain package as default.

First of all, you need to install (if you haven't install opencv before)

sudo apt-get install ros-kinetic-opencv3

Secondly, change the dependency to opencv3 from opencv2 in that concerned package and then catkin_make.

Hope it helps!

edit flag offensive delete link more

Question Tools


Asked: 2017-06-28 04:38:08 -0500

Seen: 1,636 times

Last updated: Jun 30 '17