Telegraf on MacOS: make succeeds, but run fails with "killed: 9"


I’m trying to build telegraf locally on a Mac to create a new plugin. I’m starting with a blank slate and want to just build a clean image first. I followed the instructions here: (under the heading “From Source”) and it made a telegraf executable file. Good so far.

When I try to execute the file i.e.: ./telegraf --help or ./telegraf --version …

It fails with the message: “Killed: 9”

Has anyone encountered this before? Is there a way to build this on a mac?


  1. go is setup and working fine.
  2. make seems to work fine.
  3. I’m using “go get -d” as the base

We had a similar issue reported some time ago on the issue tracker, it was an issue with CGO and was resolved by updating the Go version:


This is an issue with the version of Go that I was using. This happens with Go 1.8 on MacOS 10.10 or higher. More details can be found here:

An update of Go v1.10 resolved the issue.