yahboom@Transbot:~/dev/catkin_ws$ source ~/.bashrc bash: /home/yahboom/software/world_canvas/devel/setup.bash: No such file or directory bash: /home/yahboom/rplidar_ws/devel/setup.bash: No such file or directory ----------------------- MY_IP: 192.168.58.55 ROS_MASTER_URI: http://192.168.58.55:11311 ----------------------- bash: /opt/ros/noetic/setup.bash: No such file or directory
时间: 2023-07-07 15:46:40 浏览: 68
根据你提供的反馈,运行`source ~/.bashrc`命令时提示`No such file or directory`,这可能是因为你的`~/.bashrc`文件中指定的路径不正确。
请打开`~/.bashrc`文件,将以下两行:
```
source /home/yahboom/software/world_canvas/devel/setup.bash
source /home/yahboom/rplidar_ws/devel/setup.bash
```
修改为:
```
source ~/dev/world_canvas/devel/setup.bash
source ~/dev/rplidar_ws/devel/setup.bash
```
然后保存文件,执行以下命令使修改生效:
```
source ~/.bashrc
```
如果你使用的是ROS Melodic版本,确保你在`~/.bashrc`文件中添加了以下行:
```
source /opt/ros/melodic/setup.bash
```
如果你使用的是ROS Noetic版本,将以上命令中的`melodic`改为`noetic`即可。
相关问题
yahboom@Transbot:~/dev/catkin_ws$ echo "source ~/dev/catkin_ws/devel/setup.bash" >> ~/.bashrc yahboom@Transbot:~/dev/catkin_ws$ source ~/.bashrc bash: /home/yahboom/software/world_canvas/devel/setup.bash: No such file or directory bash: /home/yahboom/rplidar_ws/devel/setup.bash: No such file or directory ----------------------- MY_IP: 192.168.58.55 ROS_MASTER_URI: http://192.168.58.55:11311 ----------------------- bash: /opt/ros/noetic/setup.bash: No such file or directory
这个错误可能是因为其中某个路径已被删除或移动。你需要检查这些路径是否存在,并在必要时更新它们。
在你的情况下,我看到了三个路径:
- `/home/yahboom/software/world_canvas/devel/setup.bash`
- `/home/yahboom/rplidar_ws/devel/setup.bash`
- `/opt/ros/noetic/setup.bash`
你可以先检查这些路径是否存在。如果不存在,则说明这些路径已被删除或移动。你需要更新这些路径,以便它们指向正确的位置。你可以编辑 `~/.bashrc` 文件,找到这些路径并将它们更新为正确的路径。例如:
```
source ~/dev/catkin_ws/devel/setup.bash
source /path/to/world_canvas/devel/setup.bash
source /path/to/rplidar_ws/devel/setup.bash
source /opt/ros/noetic/setup.bash
```
你需要将 `/path/to/world_canvas/devel/setup.bash` 和 `/path/to/rplidar_ws/devel/setup.bash` 替换为正确的路径。
yahboom@Transbot:~/dev/catkin_ws$ source ~/dev/catkin_ws/devel/setup.bash yahboom@Transbot:~/dev/catkin_ws$ echo"source~/dev/catkin_ws/devel/setup.bash" >> ~/.bashrc bash: echosource~/dev/catkin_ws/devel/setup.bash: No such file or directory
这个错误可能是因为你在执行 `echo` 命令的时候,没有在 `echo` 和文件路径之间添加空格。你可以尝试使用以下命令来添加一个空格并将路径添加到 `~/.bashrc` 文件中:
```
echo "source ~/dev/catkin_ws/devel/setup.bash" >> ~/.bashrc
```
这应该会将路径添加到 `~/.bashrc` 文件的末尾,这样每次打开终端时都会自动加载该文件,并且你可以执行 `source ~/.bashrc` 命令来立即加载该文件。
阅读全文