# Building from source got errors

**URL:** <https://community.grafana.com/t/building-from-source-got-errors/2843>\
**Category:** Installation\
**Created:** [September 20, 2017, 7:29am UTC](https://community.grafana.com/t/building-from-source-got-errors/2843 "2017-09-20T07:29:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![roenszm](https://avatars.discourse-cdn.com/v4/letter/r/46a35a/32.png) [@roenszm](https://community.grafana.com/u/roenszm)\
**Post date:** [September 20, 2017, 7:29am UTC](https://community.grafana.com/t/building-from-source-got-errors/2843/1 "2017-09-20T07:29:07Z")

</div>

Hi, I try to build grafana from source by this tutorial:[http://docs.grafana.org/project/building\_from\_source/](http://docs.grafana.org/project/building_from_source/).

when I “go run build.go setup”, I got the following errors:

```
pkg/api/http_server.go:65: undefined: http.ErrServerClosed
pkg/api/http_server.go:71: undefined: http.ErrServerClosed
pkg/api/http_server.go:96: hs.httpSrv.Shutdown undefined (type *http.Server has no field or method Shutdown)
...
pkg/tsdb/mysql/mysql.go:157: rows.ColumnTypes undefined (type *core.Rows has no field or method ColumnTypes)
pkg/tsdb/mysql/mysql.go:183: undefined: sql.ColumnType
github.com/grafana/grafana/pkg/tsdb/opentsdb
github.com/grafana/grafana/vendor/github.com/prometheus/client_golang/api
github.com/grafana/grafana/vendor/github.com/prometheus/client_golang/api/prometheus/v1
github.com/grafana/grafana/pkg/tsdb/prometheus
exit status 2
exit status 1

```

does anyone have this issue?  
My environment is ubuntu 17.04.

---

<div class="post-metadata">

**Author:** ![torkel](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/torkel/32/20_2.png) [@torkel](https://community.grafana.com/u/torkel)\
**Post date:** [September 20, 2017, 6:44pm UTC](https://community.grafana.com/t/building-from-source-got-errors/2843/2 "2017-09-20T18:44:08Z")

</div>

What Go version are you using?

---

<div class="post-metadata">

**Author:** ![roenszm](https://avatars.discourse-cdn.com/v4/letter/r/46a35a/32.png) [@roenszm](https://community.grafana.com/u/roenszm)\
**Post date:** [September 21, 2017, 3:44am UTC](https://community.grafana.com/t/building-from-source-got-errors/2843/3 "2017-09-21T03:44:36Z")

</div>

go version go1.7.4 linux/amd64

---

<div class="post-metadata">

**Author:** ![torkel](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/torkel/32/20_2.png) [@torkel](https://community.grafana.com/u/torkel)\
**Post date:** [September 21, 2017, 5:34am UTC](https://community.grafana.com/t/building-from-source-got-errors/2843/4 "2017-09-21T05:34:49Z")

</div>

Try go 1.8, or 1.9 that will work better

---

<div class="post-metadata">

**Author:** ![roenszm](https://avatars.discourse-cdn.com/v4/letter/r/46a35a/32.png) [@roenszm](https://community.grafana.com/u/roenszm)\
**Post date:** [September 21, 2017, 7:57am UTC](https://community.grafana.com/t/building-from-source-got-errors/2843/5 "2017-09-21T07:57:38Z")

</div>

I tried go 1.9 and it works. Thanks!

---

<div class="post-metadata">

**Author:** ![danielgonzalez](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/danielgonzalez/32/7125_2.png) [@danielgonzalez](https://community.grafana.com/u/danielgonzalez)\
**Post date:** [July 12, 2018, 2:11am UTC](https://community.grafana.com/t/building-from-source-got-errors/2843/6 "2018-07-12T02:11:44Z")

</div>

i am getting:

```
daniel@daniel-X550LD:~/grafana-custom/src/github.com/grafana/grafana$ go run build.go build
Version: 5.3.0-pre1, Linux Version: 5.3.0, Package Iteration: 1531361307pre1
rm -r ./bin/linux-amd64/grafana-server
rm -r ./bin/linux-amd64/grafana-server.md5
go version
go version go1.8.3 linux/amd64
Targeting linux/amd64
go build -ldflags -w -X main.version=5.3.0-pre1 -X main.commit=9b50c9038 -X main.buildstamp=1531333418 -o ./bin/linux-amd64/grafana-server ./pkg/cmd/grafana-server
# github.com/grafana/grafana/vendor/github.com/grafana/grafana-plugin-model/go/datasource
vendor/github.com/grafana/grafana-plugin-model/go/datasource/service.go:20: cannot use GRPCServer literal (type *GRPCServer) as type DatasourcePluginServer in argument to RegisterDatasourcePluginServer:
	*GRPCServer does not implement DatasourcePluginServer (wrong type for Query method)
		have Query("context".Context, *DatasourceRequest) (*DatasourceResponse, error)
...
...
pkg/social/social.go:167: cannot use SocialGrafanaCom literal (type *SocialGrafanaCom) as type SocialConnector in assignment:
	*SocialGrafanaCom does not implement SocialConnector (wrong type for Client method)
		have Client("github.com/grafana/grafana/vendor/golang.org/x/net/context".Context, *oauth2.Token) *http.Client
		want Client("context".Context, *oauth2.Token) *http.Client
exit status 2
exit status 1

```

and

```
daniel@daniel-X550LD:~/grafana-custom/src/github.com/grafana/grafana$ go run build.go build
Version: 5.3.0-pre1, Linux Version: 5.3.0, Package Iteration: 1531361379pre1
rm -r ./bin/linux-amd64/grafana-server
rm -r ./bin/linux-amd64/grafana-server.md5
go version
go version go1.8.3 linux/amd64
Targeting linux/amd64
go build -ldflags -w -X main.version=5.3.0-pre1 -X main.commit=9b50c9038 -X main.buildstamp=1531333418 -o ./bin/linux-amd64/grafana-server ./pkg/cmd/grafana-server
# github.com/grafana/grafana/vendor/github.com/grafana/grafana-plugin-model/go/renderer
vendor/github.com/grafana/grafana-plugin-model/go/renderer/service.go:20: cannot use GRPCServer literal (type *GRPCServer) as type RendererServer in argument to RegisterRendererServer:
	*GRPCServer does not implement RendererServer (wrong type for Render method)
		have Render("context".Context, *RenderRequest) (*RenderResponse, error)
		want Render("github.com/grafana/grafana/vendor/golang.org/x/net/context".Context, *RenderRequest) (*RenderResponse, error)
# github.com/grafana/grafana/vendor/github.com/grafana/grafana-plugin-model/go/datasource
vendor/github.com/grafana/grafana-plugin-model/go/datasource/service.go:20: cannot use GRPCServer literal (type *GRPCServer) as type DatasourcePluginServer in argument to RegisterDatasourcePluginServer:
	*GRPCServer does not implement DatasourcePluginServer (wrong type for Query method)
		have Query("context".Context, *DatasourceRequest) (*DatasourceResponse, error)
		want Query("github.com/grafana/grafana/vendor/golang.org/x/net/context".Context, *DatasourceRequest) (*DatasourceResponse, error)
# github.com/grafana/grafana/pkg/social
pkg/social/social.go:115: cannot use SocialGithub literal (type *SocialGithub) as type SocialConnector in assignment:
	*SocialGithub does not implement SocialConnector (wrong type for Client method)
		have Client("github.com/grafana/grafana/vendor/golang.org/x/net/context".Context, *oauth2.Token) *http.Client
		want Client("context".Context, *oauth2.Token) *http.Client
pkg/social/social.go:129: cannot use SocialGoogle literal (type *SocialGoogle) as type SocialConnector in assignment:
	*SocialGoogle does not implement SocialConnector (wrong type for Client method)
		have Client("github.com/grafana/grafana/vendor/golang.org/x/net/context".Context, *oauth2.Token) *http.Client
		want Client("context".Context, *oauth2.Token) *http.Client
pkg/social/social.go:144: cannot use SocialGenericOAuth literal (type *SocialGenericOAuth) as type SocialConnector in assignment:
	*SocialGenericOAuth does not implement SocialConnector (wrong type for Client method)
		have Client("github.com/grafana/grafana/vendor/golang.org/x/net/context".Context, *oauth2.Token) *http.Client
		want Client("context".Context, *oauth2.Token) *http.Client
pkg/social/social.go:167: cannot use SocialGrafanaCom literal (type *SocialGrafanaCom) as type SocialConnector in assignment:
	*SocialGrafanaCom does not implement SocialConnector (wrong type for Client method)
		have Client("github.com/grafana/grafana/vendor/golang.org/x/net/context".Context, *oauth2.Token) *http.Client
		want Client("context".Context, *oauth2.Token) *http.Client
exit status 2
exit status 1

```

can you helpme?
