/bin/sh: 1: source: not found
时间: 2023-12-21 14:20:04 浏览: 296
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
相关问题
ERROR: module command /usr/bin/modulecmd python purge failed with message: /bin/sh: 1: /usr/bin/modulecmd: not found
看起来你正在尝试在一个环境中配置ROS(Robot Operating System)项目,但遇到了CMake问题以及找不到特定库(如LevelDB)的错误。当遇到`modulecmd`命令未找到的情况时,这通常意味着系统环境变量可能还没有设置好,使得`modulecmd`工具无法找到。
解决这个问题的步骤可以包括:
1. **检查模块加载路径**[^1]:
```shell
echo $PATH
```
查看你的$PATH环境变量是否包含了`/usr/bin`,因为`modulecmd`应该位于那里。
2. **更新模块路径**:
如果`modulecmd`不在$PATH中,你可以手动添加它所在的路径,通常是 `/usr/libexec/openmpi` 或 `/opt/modules`。例如:
```bash
export PATH="/usr/libexec/openmpi/bin:$PATH"
```
3. **重新加载模块**:
使用 `source` 命令来应用新的路径设置:
```shell
source ~/.bashrc
```
4. **安装模块**:
对于`LevelDB`,如果`find_package`不能自动安装,可能需要先安装它:
```shell
sudo apt-get install liblevel-db-dev
```
5. **再次尝试配置**:
清理并重新运行 `cmake` 和 `make` 命令以重新构建项目。
如果你按照以上步骤操作仍然存在问题,可能需要查阅具体的ROS教程或文档,因为它们可能会提供更详细的依赖项管理和配置指南。
./Sourcetrail.sh: 13: exec: /home/lin/Sourcetrail-master/Sourcetrail-master/setup/Linux/data/package/bin/sourcetrail: not found
根据错误提示,你运行的Sourcetrail脚本无法找到可执行文件 `/home/lin/Sourcetrail-master/Sourcetrail-master/setup/Linux/data/package/bin/sourcetrail`。这可能是因为你没有正确安装Sourcetrail或者安装路径不正确。你可以检查一下Sourcetrail的安装路径是否正确,并且确认你已经按照安装指南正确地安装了Sourcetrail。如果问题仍然存在,你可以尝试重新安装Sourcetrail或者从Sourcetrail官方网站获取支持。
阅读全文
相关推荐
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241231044955.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.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)