创建ROS工作区间后,catking_init_workspace工作区间出现以下错误:
Could neither symlink nor copy file "/opt/ros/kinetic/share/catkin/cmake/toplevel.cmake" to "/home/axiong/turtlebot_ws/src/CMakeLists.txt":
- [Errno 13] Permission denied
- [Errno 13] Permission denied: '/home/axiong/turtlebot_ws/src/CMakeLists.txt'ax
原来是我创工作区间时使用了sudo,使得工作区间的拥有者是root。可使用chown更改文件使用者。
chown语法
chown [-cfhvR] [--help] [--version] user[:group] file...
user : 新的文件拥有者的使用者 ID
group : 新的文件拥有者的使用者组(group)
对于我的情况:
sudo chown -R axiong:axiong turtlebot_ws/