# Building Telegraf , But there is no executable

**URL:** <https://community.influxdata.com/t/building-telegraf-but-there-is-no-executable/10880>\
**Category:** InfluxDB 2\
**Tags:** telegraf\
**Created:** [August 13, 2019, 11:28pm UTC](https://community.influxdata.com/t/building-telegraf-but-there-is-no-executable/10880 "2019-08-13T23:28:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deepak\_Jain](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/deepak_jain/32/3497_2.png) [@Deepak\_Jain](https://community.influxdata.com/u/Deepak_Jain)\
**Post date:** [August 13, 2019, 11:28pm UTC](https://community.influxdata.com/t/building-telegraf-but-there-is-no-executable/10880/1 "2019-08-13T23:28:24Z")

</div>

I am building telegraf with instructions on README. I see no build errors with make. However there is no executable in GOPATH/bin or current directory.

Appreciate your support.

> $ sudo GOPATH=/Users/dj/Documents/telegraf\_prod/ GOOS=linux GOENV=amd64 make

And the output is

> dep ensure -vendor-only  
> go build -ldflags " -X main.commit=5473872a -X main.branch=master" ./cmd/telegraf  
> $

Even, if i run the go build cmd from above, i do not see any build errors but then again the executable is missing.

> $ go build -ldflags " -X main.commit=5473872a -X main.branch=master" ./cmd/telegraf  
> $

> ls /Users/dj/Documents/telegraf\_prod/bin/  
> deadcode go-outline gochecknoinits gocyclo goimports gometalinter gorename gotype interfacer misspell safesql unconvert  
> dupl goaddimport gocode godef golangci-lint gomodifytags goreturns guru lll nakedret staticcheck unparam  
> errcheck gochecknoglobals goconst gogetdoc golint gopkgs gosec ineffassign maligned revive structcheck varcheck  
> $

---

<div class="post-metadata">

**Author:** ![Deepak\_Jain](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/deepak_jain/32/3497_2.png) [@Deepak\_Jain](https://community.influxdata.com/u/Deepak_Jain)\
**Post date:** [August 16, 2019, 4:50pm UTC](https://community.influxdata.com/t/building-telegraf-but-there-is-no-executable/10880/2 "2019-08-16T16:50:49Z")

</div>

Appreciate any help here.

---

<div class="post-metadata">

**Author:** ![aimdev](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@aimdev](https://community.influxdata.com/u/aimdev)\
**Post date:** [August 20, 2019, 3:31am UTC](https://community.influxdata.com/t/building-telegraf-but-there-is-no-executable/10880/3 "2019-08-20T03:31:02Z")

</div>

apart from not using sudo, I build it on debian stretch following the instructions, as a non-root user and the executable is here  
~/goproj/src/github.com/influxdata/telegraf  
is down the source tree.  
Note it take a time to build, about 10min on a 4G VM.  
had to install git, go and dep, and set up the environment, make sure you have the environment correct,  
Also look for loads of files in ~/goproj/pkg/dep/sources/  
Obviously replace ~/goproj with your directory 🙂

---

<div class="post-metadata">

**Author:** ![rawkode](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/rawkode/32/5161_2.png) [@rawkode](https://community.influxdata.com/u/rawkode)\
**Post date:** [August 20, 2019, 8:28am UTC](https://community.influxdata.com/t/building-telegraf-but-there-is-no-executable/10880/4 "2019-08-20T08:28:03Z")

</div>

Telegraf binary doesn’t go in ./bin, it’ll be in your Telegraf checkout directory at the top level
