如何修复 "Failed to execute child process source (no such file or directory)"

How to fix "Failed to execute child process source (no such file or directory)"

我正在尝试 运行 一个脚本,以便在 运行 安装驱动程序之前获取我的 catkin 工作区。

这是 bash 我正在尝试 运行:

#!/bin/bash

gnome-terminal -e sudo systemctl start firmwared.service
sphinx /opt/parrot-sphinx/usr/share/sphinx/drones/bebop2.drone &

gnome-terminal -e source ~/bebop_ws/devel/setup.bash
roslaunch bebop_driver bebop_node.launch ip:=10.202.0.1

当 运行 连接我的 bash

时,我得到 无法执行子进程源(没有这样的文件或目录)

source 内置于 shell 中,因此您必须执行类似

的操作
gnome-terminal -e 'bash -c "source ~/bebop_ws/devel/setup.bash"'

好像是引用的问题,应该是这样的

gnome-terminal -e "bash -c 'source ~/bebop_ws/devel/setup.bash;roslaunch bebop_driver bebop_node.launch ip:=10.202.0.1'"

如果您想在 windows 上使用 GUI 但失败了,那么只需使用下一个命令:

sudo apt-get install dbus-x11