0

我绑定了以下步骤

cd $GOPATH/src/github.com/grafana/grafana go run build.go setup 我得到以下版本: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 go get -v github.com/blang /semver github.com/blang/semver (下载) github.com/blang/semver go get -v github.com/mattn/go-sqlite3 go install -v github.com/mattn/go-sqlite3

然后我执行

$GOPATH/bin/godep restore 我没有 putput 但命令已执行

然后我运行了命令

去运行构建。去构建

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 安装

我必须安装 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:胸罩:找不到命令

我试图寻找解决方案,但我找不到它。请帮忙

4

4 回答 4

1

您可以使用 home brew 安装 Grafana。

brew update
brew install grafana
于 2017-02-14T09:55:13.807 回答
1

在源更改时重新编译后端 在源更改时重新编译(需要您执行 godep restore)

go get github.com/Unknwon/bra
bra run

在本地运行 Grafana 您可以通过运行以下命令来运行 Grafana 的本地实例:

 ./bin/grafana-server 

你一定错过了这一步!

 go get github.com/Unknwon/bra
于 2015-09-21T07:39:11.190 回答
0

这听起来像是一个刚刚安装 Go 以构建其他东西的问题(对我来说,它是 Grafana)。在这种情况下 $GOPATH/bin 不在您的 PATH 中。$GOPATH/bin/bra 应该可以工作。它对我有用。

于 2016-03-04T02:18:50.227 回答
0

我建议你在 Docker 中安装 Grafana。如果您安装Docker for Mac,GUI ( Kitematic ) 将允许您一键安装 grafana。您只需要使用“+ New”按钮创建一个新容器,在现有图像列表中搜索 grafana,然后单击“Create”

在此处输入图像描述

Docker 会下载 grafana,它会出现在左侧边栏中:

在此处输入图像描述

于 2017-02-22T13:13:16.600 回答