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

catkin_make cpp error-- couln't find package

asked 2018-11-09 04:33:53 -0600

selcuk yolcu gravatar image

updated 2018-11-09 05:11:34 -0600

gvdhoorn gravatar image

After I type catkin_create_pkg the all folders and files created in ros_basics_tutorials.

However After this command, I type

cd catkin_ws

and then


This error is shown

I couldn't solve? How can solve it?

selcuk@ubuntu:~/catkin_ws$ catkin_make
Base path: /home/selcuk/catkin_ws
Source space: /home/selcuk/catkin_ws/src
Build space: /home/selcuk/catkin_ws/build
Devel space: /home/selcuk/catkin_ws/devel
Install space: /home/selcuk/catkin_ws/install
#### Running command: "make cmake_check_build_system" in
-- Using CATKIN_DEVEL_PREFIX: /home/selcuk/catkin_ws/build/devel
-- Using CMAKE_PREFIX_PATH: /home/selcuk/catkin_ws/devel;/opt/ros/melodic
-- This workspace overlays: /home/selcuk/catkin_ws/devel;/opt/ros/melodic
-- Using PYTHON_EXECUTABLE: /home/selcuk/python/anaconda2/bin/python2
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/selcuk/catkin_ws/build/test_results
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.14
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 2 packages in topological order:
-- ~~  - ros_basics_tutorials
-- ~~  - naoqi_driver
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'ros_basics_tutorials'
-- ==> add_subdirectory(ros_basics_tutorials)
-- Could NOT find cpp (missing: cpp_DIR)
-- Could not find the required component 'cpp'. The following CMake
error indicates that you either need
to install the package with the same
name or change your environment so
that it can be found. CMake Error at
(find_package):   Could not find a
package configuration file provided by
"cpp" with any of   the following


  Add the installation prefix of "cpp"
to CMAKE_PREFIX_PATH or set "cpp_DIR" 
to a directory containing one of the
above files.  If "cpp" provides a  
separate development package or SDK,
be sure it has been installed. Call
Stack (most recent call first):  

-- Configuring incomplete, errors occurred! See also
"/home/selcuk/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also
Makefile:320: 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

2 Answers

Sort by ยป oldest newest most voted

answered 2018-11-09 05:23:01 -0600

gvdhoorn gravatar image
Could not find a package configuration file provided by
"cpp" with any of   the following names:


The issue is that cpp is not a package in your workspace, or a package that has been released through the ROS buildfarm.

Could it be that it should be roscpp?

edit flag offensive delete link more



I couldn't find how I could install that package?

selcuk yolcu gravatar image selcuk yolcu  ( 2018-11-12 05:48:13 -0600 )edit

I couldn't find how I could install that package?

which package? roscpp? That should already be installed for you, as it's the basis of ROS 1.

gvdhoorn gravatar image gvdhoorn  ( 2018-11-12 10:32:05 -0600 )edit

Did you solved this problem?

gokhan.acer gravatar image gokhan.acer  ( 2021-02-24 05:05:44 -0600 )edit

answered 2022-07-24 06:24:34 -0600

i have solved that problem, In the package you have created go to CMakeLists.txt and check it must be roscpp not cpp , in my case i found cpp i have replace it by roscpp.

find_package(catkin REQUIRED COMPONENTS roscpp std_msgs message_generation )

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-11-09 04:33:35 -0600

Seen: 902 times

Last updated: Nov 09 '18