cp: 无法创建目录'/etc/ros/ros_github': 权限不够
时间: 2023-07-30 15:06:13 浏览: 63
这个错误提示表示你没有足够的权限在 "/etc/ros/" 目录下创建名为 "ros_github" 的文件夹。这是因为在 Linux 中,只有超级用户(root)才有权限在 "/etc/" 目录下创建文件夹。你需要以管理员身份运行 cp 命令来解决这个问题。你可以在命令前加上 "sudo",这将会使用管理员权限来运行 cp 命令。例如,可以尝试运行以下命令来复制文件夹:
```
sudo cp -r /path/to/source /etc/ros/ros_github
```
这样,cp 命令将会以管理员权限运行,你就可以在 "/etc/ros/" 目录下创建名为 "ros_github" 的文件夹并复制源文件夹到该目录下。
相关问题
git clone https://github.com/ros/catkin.git
要克隆https://github.com/ros/catkin.git的git仓库,您可以在工作空间的src路径下执行以下命令行:
```
$ git clone https://github.com/ros/catkin.git
```
这将克隆catkin的git仓库到您的工作空间中的src文件夹中。请确保您的网络连接正常,并且您具有克隆该仓库所需的权限。如果您遇到任何错误,请检查您的网络连接和权限设置。
#### 引用[.reference_title]
- *1* *3* [git clone fatal: unable to access ‘https://github.com/robopeak/rplidar_ros.git/](https://blog.csdn.net/m0_53294928/article/details/122736258)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [Ubuntu18.0 Livox mid40配置bug-ROS安装、catkin安装、catkin_make出错](https://blog.csdn.net/weixin_40847138/article/details/115320069)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
git clone https://github.com/ros/catkin.git失败
根据引用\[1\]和引用\[3\]的内容,当执行"git clone"命令时,可能会出现连接失败的错误。这个错误通常是由于git无法使用SSL进行连接所导致的。解决这个问题的方法是使用libcurl4-gnutls-dev替换gnutls对git进行编译。以下是解决方法的具体步骤:
1. 打开终端,并在根目录下执行以下命令更新软件包列表:
```
sudo apt-get update
```
2. 安装必要的软件包和依赖项:
```
sudo apt-get install build-essential fakeroot dpkg-dev libcurl4-openssl-dev
```
3. 使用libcurl4-gnutls-dev替换gnutls对git进行编译:
```
mkdir ~/git-openssl
cd ~/git-openssl
apt-get source git
```
4. 进入git源码目录:
```
cd git-2.17.1/ #实际版本可能不同
```
5. 编译和安装git:
```
sudo make
sudo make install
```
通过以上步骤,你应该能够成功解决git clone https://github.com/ros/catkin.git失败的问题。请注意,实际的git版本和目录可能会有所不同,所以请根据你的实际情况进行相应的调整。
#### 引用[.reference_title]
- *1* *3* [git clone fatal: unable to access ‘https://github.com/robopeak/rplidar_ros.git/](https://blog.csdn.net/m0_53294928/article/details/122736258)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [Ubuntu18.04 编译 ORB-SLAM2(./build.sh + ./build_ros.sh)完整流程,各种报错处理(踩坑总结)](https://blog.csdn.net/m0_60355964/article/details/124065545)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]