我绑了以下步骤
然后我执行了cd $ GOPATH / src / github.com / grafana / grafana 去运行build.go设置 我得到了以下内容 版本:2.5.0-pre1,Linux版本:2.5.0,包迭代:pre1 go get -v github.com/tools/godep github.com/tools/godep(下载) github.com/tools/godep/Godeps/_workspace/src/github.com/kr/fs github.com/tools/godep/Godeps/_workspace/src/github.com/pmezard/go-difflib/difflib github.com/tools/godep/Godeps/_workspace/src/golang.org/x/tools/go/vcs github.com/tools/godep 去获取-v github.com/blang/semver github.com/blang/semver(下载) github.com/blang/semver go get -v github.com/mattn/go-sqlite3 去安装-v github.com/mattn/go-sqlite3
$ GOPATH / bin / godep恢复 我没有投入,但命令被执行
然后我运行了命令
去运行build.go build
Version: 2.5.0-pre1, Linux Version: 2.5.0, Package Iteration: pre1
rm -r bin
rm -r Godeps/_workspace/pkg
rm -r Godeps/_workspace/bin
rm -r dist
rm -r tmp
rm -r /Users/skhare/sk/go/pkg/darwin_amd64/github.com/grafana
rm -r ./bin/grafana-server
rm -r ./bin/grafana-server.md5
GOPATH=/Users/skhare/sk/go/src/github.com/grafana/grafana/Godeps/_workspace:/Users/skhare/sk/go
go build -ldflags -w -X main.version '2.5.0-pre1' -X main.commit 'v2.1.2+394- gfb767f5' -X main.buildstamp 1442671169 -o ./bin/grafana-server .
# github.com/grafana/grafana
link: warning: option -X main.version 2.5.0-pre1 may not work in future releases; use -X main.version=2.5.0-pre1
link: warning: option -X main.commit v2.1.2+394-gfb767f5 may not work in future releases; use -X main.commit=v2.1.2+394-gfb767f5
link: warning: option -X main.buildstamp 1442671169 may not work in future releases; use -X main.buildstamp=1442671169
然后我执行了
npm install
我必须安装npm
>npm install -g grunt-cli
/usr/local/bin/grunt -> /usr/local/lib/node_modules/grunt-cli/bin/grunt
grunt-cli@0.1.13 /usr/local/lib/node_modules/grunt-cli
├── resolve@0.3.1
├── nopt@1.0.10 (abbrev@1.0.7)
└── findup-sync@0.1.3 (lodash@2.4.2, glob@3.2.11)
>grunt
Running "jscs:src" (jscs) task
>> 156 files without code style errors.
Running "jshint:source" (jshint) task
✔ No problems
Running "jshint:tests" (jshint) task
✔ No problems
Running "tslint:source" (tslint) task
>> 11 files lint free.
Running "clean:gen" (clean) task
Cleaning public_gen...OK
Running "copy:public_to_gen" (copy) task
Created 122 directories, copied 553 files
Running "less:src" (less) task
File public_gen/css/bootstrap.dark.min.css created.
File public_gen/css/bootstrap.light.min.css created.
File public_gen/css/bootstrap-responsive.min.css created.
Running "concat:cssDark" (concat) task
File public_gen/css/grafana.dark.min.css created.
Running "concat:cssLight" (concat) task
File public_gen/css/grafana.light.min.css created.
Running "typescript:build" (typescript) task
42 files created. js: 14 files, map: 14 files, declaration: 14 files (968ms)
Done, without errors.
>go get github.com/Unknwon/bra
上面的命令没有给出任何输出,也没有给出错误信息
胸罩跑 它说--bash:bra:command not found
我试图寻找分辨率,但我找不到它。请帮忙
答案 0 :(得分:1)
在源更改时重新编译后端 要在源更改时重建(要求您执行godep恢复)
go get github.com/Unknwon/bra
bra run
在当地运行Grafana 您可以通过运行以下命令运行Grafana的本地实例:
./bin/grafana-server
你一定错过了这一步!
go get github.com/Unknwon/bra
答案 1 :(得分:1)
您可以使用自制啤酒安装Grafana。
ArrayList<Integer> tempJSONObjectAL= null;
if(indexOfJSONObject.size() > givenIndex)
tempJSONObjectAL = (ArrayList<Integer>)indexOfJSONObject.get(givenIndex);
答案 2 :(得分:0)
这听起来像Go正在安装以构建其他东西的问题(对我而言,它是Grafana)。在这种情况下,$ GOPATH / bin不在您的PATH中。 $ GOPATH / bin / bra应该有效。它确实适合我。
答案 3 :(得分:0)
我建议您在Docker中安装Grafana。如果您安装Docker for Mac,GUI(Kitematic)将允许您轻松一键安装grafana。您只需要使用“+ New”按钮创建一个新容器,通过现有图像列表搜索grafana并单击“创建”
Docker将下载grafana,它将显示在左侧边栏中: