Colcon build failed--ubuntu20.04--ROS2 Foxy [closed]
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:
dev_pkgConfig.cmake
dev_pkg-config.cmake
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.
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.
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? Isdev_pkg
a Python or C++ package?