The command "hugo" exited with 127


My build failed with the following error message:

The program ‘hugo’ is currently not installed. To run ‘hugo’ please ask your administrator to install the package ‘hugo’

The command “hugo” exited with 127.

Done. Your build exited with 1.

However, hugo is already installed on my mac:

% which hugo

% ls -l $( which hugo )
lrwxr-xr-x 1 /usr/local/bin/hugo -> ../Cellar/hugo/0.78.2/bin/hugo

% hugo version
Hugo Static Site Generator v0.78.2/extended darwin/amd64 BuildDate: unknown

My travis.yml:

language: go
- wget
- tar -xf hugo_0.78.2_macOS-64bit.tar.gz

# - hugo version
# Clean
- rm -rf public

# Build the website
- hugo

  - master

Since I’m on a mac, don’t I select the macOS-64bit.tar.gz instead of Linux-64bit.deb?

Thank you for shedding some light…

This means it’s installed with Homebrew. You need to do the same on the builder. This is preferrable to installing it by hand.

If you wish to unpack it from a tarball, the exectutable would end up in the current directory (check the tarball’s contents to see that) so you’d need to invoke it as ./hugo .