I've been using ROS2 Humble for a few months now - never faced this issue. Created a new package a few days back, but today, when I run colcon build, I get this error:
CMake Error at cmake_install.cmake:60 (file):
file INSTALL cannot copy file
"/home/<my_username>/ros2_ws/build/gesture_recognition/image_publisher_node"
to "/lib/gesture_recognition/image_publisher_node": Permission denied.
I've tried running sudo colcon build too, but then all the files created in install are protected and can't be accessed. Any fixes?
EDIT : I've added the source /opt/ros/humble/setup.bash into my .bashrc, its all been setup properly, haven't faced any build issues like this so far. All I've done a few days back is added the VirtualBox Extension Pack to my VirtualBox VM, so that I can access the webcam in ROS2.
ws_ros2directory), but if that assumption is not correct, you'll have to fix your directory permissions. I'll update my answer. – cst0 Aug 14 '23 at 14:18drwxrwxr-x build drwxrwxr-x install -rw-rw-r-- LICENSE drwxrwxr-x log -rw-rw-r-- README.md drwxrwxr-x src
– KK29 Aug 14 '23 at 14:22