Skip to content
Latchkey

Go "installing executables with go get ... not supported" - Fix in CI

Modern Go no longer installs command-line tools with go get. In a module context go get only manages dependencies; installing an executable now requires go install pkg@version, and the old form errors.

What this error means

A CI step that runs go get github.com/org/tool to install a binary fails with installing executables with go get in module mode is no longer supported. It surfaces after upgrading to a Go version that removed the legacy behavior.

go output
go: installing executables with 'go get' in module mode is no longer supported;
	use 'go install pkg@version' instead

Common causes

Using go get to install a tool

Older guides install CLIs with go get. In current Go that path is removed - go get now only edits the dependency graph of the current module.

A tool install run inside a module directory

Running the old command from within a module also tries to mutate that module’s go.mod, which is not what installing a standalone tool should do.

How to fix it

Use go install with an explicit version

Install the binary with go install pkg@version, which works independent of the current module.

Terminal
go install github.com/org/tool@latest
go install github.com/org/tool@v1.5.0   # pin for reproducibility

Track CLI tools as build dependencies

For tools your build needs, record them in a tools file and install them by version.

Go
// tools.go
//go:build tools
package tools
import _ "github.com/org/tool"

How to prevent it

  • Install CLIs with go install pkg@version, never go get.
  • Pin tool versions for reproducible CI installs.
  • Update old scripts/READMEs that still use go get to install tools.

Frequently asked questions

What causes ""go get ... not supported""?
Older guides install CLIs with go get. In current Go that path is removed - go get now only edits the dependency graph of the current module.
How do I fix "go get ... not supported"?
Install the binary with go install pkg@version, which works independent of the current module.

Related guides

References

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