Colcon build failed--ubuntu20.04--ROS2 Foxy [closed]

asked 2022-04-19 23:27:39 -0500

Heatherzhy gravatar image

updated 2023-06-27 06:09:12 -0500

130s gravatar image

I created a workspace and then created a package. I downloaded a source file and try build it using colcon build in my workspace. I got the error printed out as below:

[0.162s] WARNING:colcon.colcon_core.prefix_path.colcon:The path '/home/heather/ros2_tas_ws/install' in the environment variable COLCON_PREFIX_PATH doesn't exist
Starting >>> dev_pkg 
--- stderr: dev_pkg                         
CMake Error at CMakeLists.txt:29 (find_package):
  By not providing "Finddev_pkg.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "dev_pkg", but
  CMake did not find one.

  Could not find a package configuration file provided by "dev_pkg" with any
  of the following names:


  Add the installation prefix of "dev_pkg" to CMAKE_PREFIX_PATH or set
  "dev_pkg_DIR" to a directory containing one of the above files.  If
  "dev_pkg" provides a separate development package or SDK, be sure it has
  been installed.

Failed   <<< dev_pkg [2.56s, exited with code 1]

Summary: 0 packages finished [2.72s]
  1 package failed: dev_pkg
  1 package had stderr output: dev_pkg

I already source the setup.bash file. I'm new to ROS2. Any help would be appreciated.

Thank you very much.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by 130s
close date 2023-06-27 06:10:18.779792



What is dev_pkg? It looks like your ROS 2 package is looking for dev_pkg but can't find it. Is it a private ROS package? If so, you will have to build it in an underlay workspace or include it in the source directory of your current workspace.

aprotyas gravatar image aprotyas  ( 2022-04-20 04:25:17 -0500 )edit

I downloaded a source file and try build it using colcon build in my workspace. - can you add in the edit of your question the folder tree of this package? Is dev_pkg a Python or C++ package?

ljaniec gravatar image ljaniec  ( 2022-04-20 07:20:06 -0500 )edit