Erro: “cgo: C compiler “gcc” not found: exec: “gcc”: executable file not found in $PATH”

Contexto

  • Comando

    $ go test ./...

  • Saída

    # runtime/cgo
    cgo: C compiler "gcc" not found: exec: "gcc": executable file not found in $PATH
    FAIL    aluno/entity [build failed]
    FAIL

Solução (no Ubuntu)

Referência: stackoverflow

  • Comando

    $ sudo apt-get install build-essential -y