Skip to content
Latchkey

MATLAB "requires X Toolbox" not licensed or installed in CI

MATLAB found the function but it belongs to a toolbox that is either not installed on the runner or not licensed. In CI this means the toolbox was not listed in setup-matlab products, or your batch token does not include it.

What this error means

A call fails with a message like "fft requires Signal Processing Toolbox" or "License checkout failed" for a toolbox feature, while base MATLAB works.

MATLAB
Error using classify
classify requires Statistics and Machine Learning Toolbox.

Common causes

The toolbox is not installed on the runner

setup-matlab installs only the products you request; a toolbox you did not list is absent.

The toolbox is not covered by the license

Even when installed, a toolbox that your batch token does not entitle fails to check out (License Manager Error -5).

How to fix it

Install the toolbox in setup-matlab

  1. Identify the toolbox the error names.
  2. Add it to the products: list in setup-matlab.
  3. Confirm your license or batch token covers that toolbox.
.github/workflows/ci.yml
- uses: matlab-actions/setup-matlab@v2
  with:
    products: >
      MATLAB
      Statistics_and_Machine_Learning_Toolbox

Verify entitlement before running

Check that the toolbox is both installed and licensed so it does not fail mid-job.

Terminal
matlab -batch "assert(license('test','Statistics_Toolbox')==1)"

How to prevent it

  • List every toolbox your code uses in setup-matlab products.
  • Confirm the batch licensing token entitles those toolboxes.
  • Assert license('test', ...) early so missing entitlements fail fast.

Frequently asked questions

What causes ""requires ... Toolbox""?
setup-matlab installs only the products you request; a toolbox you did not list is absent.
How do I fix "requires ... Toolbox"?
Install the toolbox in setup-matlab

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card