/bin/sh: 1: source: not found
时间: 2023-12-21 22:20:04 浏览: 66
This error occurs when the 'source' command is used in a shell that does not support it.
The 'source' command is typically used in bash shell to execute the contents of a file in the current shell context.
To resolve this error, try to run the script in bash shell or replace the 'source' command with '.' (dot) command which is a POSIX-compatible way to execute the contents of a file in the current shell context.
For example, instead of using:
source myscript.sh
Use:
. myscript.sh
相关问题
/system/bin/sh: chmond: not found
在引用中,报错"/system/bin/sh: disable-verity: not found"表示在执行命令"adb disable-verity"时找不到"disable-verity"命令。同样地,在引用中,报错"/system/bin/sh: adb: not found"表示在执行命令"adb shell dumpsys window | findstr usedApp"时找不到"adb"命令。这些错误通常是因为adb命令无法在系统中找到而导致的。
在引用中,报错"/system/bin/sh: su: not found"表示在执行命令"su"时找不到"su"命令。这个错误一般是因为Android Studio带有(Google Play)的模拟器无法获得root权限所导致的。
而在问题中的报错"/system/bin/sh: chmond: not found"也是类似的情况,表示在执行命令"chmond"时找不到"chmond"命令。
综上所述,这些报错都是由于系统找不到相应的命令而导致的。可以尝试检查命令是否正确输入或者确认对应的命令是否存在于系统中。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [/system/bin/sh: disable-verity: not found](https://blog.csdn.net/AA5279AA/article/details/126288496)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [使用ADB报错“/system/bin/sh: findstr: not found”如何处理?](https://blog.csdn.net/wuwei13798642/article/details/126621515)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [解决android studio中使用monitor工具无法打开data文件夹问题](https://download.csdn.net/download/weixin_38667581/14878389)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
-/bin/sh: gcc: not found
/bin/sh: gcc: not found 是一个错误提示,表示在当前系统中找不到 gcc 编译器。gcc 是 GNU Compiler Collection 的缩写,是一种常用的编译器工具,用于编译 C、C++ 等程序语言。
如果你在使用 gcc 编译器时遇到了这个错误,可能是因为你的系统没有安装 gcc 或者没有将其路径添加到环境变量中。你可以通过以下步骤来解决这个问题:
1. 检查是否已经安装了 gcc。在终端中输入以下命令:
```
gcc --version
```
如果显示出 gcc 的版本信息,则表示已经安装了 gcc。如果没有显示任何信息或者提示找不到命令,则需要进行下一步操作。
2. 安装 gcc。根据你所使用的操作系统不同,安装 gcc 的方法也会有所不同。例如,在 Ubuntu 系统中,可以使用以下命令安装 gcc:
```
sudo apt-get install gcc
```
在其他操作系统中,可以通过包管理器或者从官方网站下载安装包进行安装。
3. 添加 gcc 路径到环境变量。如果已经安装了 gcc,但仍然提示找不到命令,可能是因为系统没有将 gcc 的路径添加到环境变量中。你可以编辑 ~/.bashrc 或者 ~/.bash_profile 文件,在其中添加以下行:
```
export PATH=$PATH:/path/to/gcc
```
将 "/path/to/gcc" 替换为你的 gcc 安装路径。保存文件后,执行以下命令使修改生效:
```
source ~/.bashrc
```
或者
```
source ~/.bash_profile
```
完成上述步骤后,再次尝试使用 gcc 编译器,应该就不会再出现 "/bin/sh: gcc: not found" 的错误了。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)