# GitHub Actions: Error: Process completed with exit code 127 — command not found

**Code:** `Process completed with exit code 127` · **Category:** CI/CD · **Seen on:** GitHub Actions, Linux

The shell could not find the command you tried to run: it is not installed on the runner, not on PATH, or misspelled.

## Meaning

Exit code 127 means "command not found". Hosted runners include many tools but not everything, and a freshly installed tool may not be on PATH in the same step. Install it with a setup action or package manager, check the exact name and case, and make sure scripts have the executable bit and a valid shebang.

## Common causes

- Tool not installed on the runner (a CLI, a language version)
- Typo or wrong case in the command
- Script not executable or missing shebang (`./deploy.sh: command not found`)
- Tool installed but not added to `PATH` for later steps
- Using a Windows command on a Linux runner (or the reverse)

## Quick fix

1. Install the tool (`actions/setup-*`, `apt-get install`, `pip install`)
2. `chmod +x script.sh` and commit the executable bit
3. Add the path with `echo "$HOME/.local/bin" >> "$GITHUB_PATH"`

## Detailed fix by platform

### GitHub Actions

1. `git update-index --chmod=+x scripts/deploy.sh` then commit
2. Check what exists: `run: which node python3 jq
3. true`

### Linux

1. `command -v mytool
2. echo "mytool is not installed"`

## Code examples

### Install before use

```yaml
- uses: actions/setup-node@v4
  with: { node-version: 20 }
- run: sudo apt-get update && sudo apt-get install -y jq
- run: jq --version
```

## How to diagnose

1. **Command** — Which command is "not found"?
2. **Runner** — ubuntu, windows or macos?
3. **Path** — Added to PATH after install?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/cicd/gha-process-completed-exit-code-127)
