Octave "octave: command not found" in CI
The shell could not find an octave executable. Hosted runners do not ship GNU Octave, so a bare octave call fails until you install it.
What this error means
A step running octave --eval ... fails with "octave: command not found" and exit code 127.
Octave
/home/runner/work/_temp/script.sh: line 1: octave: command not found
Error: Process completed with exit code 127.Common causes
Octave is not installed on the runner
Hosted runners have no Octave by default, so the executable does not exist on PATH.
Only octave-cli exists
Some images install octave-cli but not the octave wrapper, so the bare name is missing.
How to fix it
Install Octave with apt
- Install
octave(andoctave-cli) before any Octave step. - Run headless with
octave-clioroctave --no-gui. - Verify with
octave --version.
Terminal
sudo apt-get update
sudo apt-get install -y octave octave-cli
octave-cli --versionUse a setup action
A dedicated Octave setup action provisions Octave across OSes without manual apt steps.
.github/workflows/ci.yml
- uses: mccdaq/setup-octave@v1 # or an equivalent octave setup action
- run: octave-cli --eval "disp('ok')"How to prevent it
- Install Octave explicitly before Octave steps on hosted runners.
- Prefer
octave-clior--no-guifor headless CI. - Bake Octave into a custom image for self-hosted runners.
Related guides
Octave "error: 'X' undefined" in CIFix Octave "error: 'X' undefined" in CI - the name is not on the Octave path (addpath missing), belongs to an…
Octave "package X is not installed" (pkg load) in CIFix Octave "error: package X is not installed" in CI - pkg load needs the package installed first with pkg in…
Octave gnuplot / headless graphics failure in CIFix Octave plotting failures on headless runners in CI - gnuplot or the graphics toolkit tries to open a disp…