tech
executable file not found in PATH
# ubuntu系统执行nerdctl compose 报错 executable file not found in PATH
安装完nerdctl 后使用 version查看正常,但是使用compose 启动容器时提示:executable file not found in PATH
## 先说结论
这个错误是因为 runc ***没有安装或不在系统的*** $PATH ***环境变量中***。
## 原始报错
如果你看到的报错和下面这段一致,那就是同一个问题:
```
failed to create shim task: OCI runtime create failed: unable to retrieve OCI runtime error ... exec: "runc": executable file not found in $PATH: unknown
```
## 解决方法
```
# 用另一台机器下载,然后传过来
# 下载地址: https://github.com/opencontainers/runc/releases/download/v1.1.12/runc.amd64
# 或者当前机器如果能解析 github.com 也可以直接下载:
sudo curl -L https://github.com/opencontainers/runc/releases/download/v1.1.12/runc.amd64 -o /usr/local/bin/runc
```