Windows上的InfluxDB安装问题

时间:2017-02-15 16:04:20

标签: go influxdb

参考 How to install InfluxDB in Windows

我已按照所有步骤进行操作:

go get -u -f ./...

但我面临的问题如下

# github.com/influxdata/influxdb/services/precreator
services\precreator\service.go:32: undefined: zap.NullEncoder
services\precreator\service.go:32: cannot use zap.New(zap.NullEncoder()) (type *zap.Logger) as type zap.Logger in field value
services\precreator\service.go:40: cannot use log.With(zap.String("service", "shard-precreation")) (type *zap.Logger) as type zap.Logger in assignment

# github.com/influxdata/influxdb/services/admin
services\admin\service.go:36: undefined: zap.NullEncoder
services\admin\service.go:36: cannot use zap.New(zap.NullEncoder()) (type *zap.Logger) as type zap.Logger in field value
services\admin\service.go:85: cannot use log.With(zap.String("service", "admin")) (type *zap.Logger) as type zap.Logger in assignment
# github.com/influxdata/influxdb/influxql
influxql\query_executor.go:184: undefined: zap.NullEncoder
influxql\query_executor.go:184: cannot use zap.New(zap.NullEncoder()) (type *zap.Logger) as type zap.Logger in field value
influxql\query_executor.go:219: cannot use log.With(zap.String("service", "query")) (type *zap.Logger) as type zap.Logger in assignment
influxql\task_manager.go:45: undefined: zap.NullEncoder
influxql\task_manager.go:45: cannot use zap.New(zap.NullEncoder()) (type *zap.Logger) as type zap.Logger in field value

我该如何解决这个问题?

2 个答案:

答案 0 :(得分:0)

go get -u github.com/influxdata/influxdb/...

按照你所指的链接的第二个答案(由XavierPeña提供)

或从https://portal.influxdata.com/downloads

下载预构建的二进制文件

答案 1 :(得分:0)

<强>解决方案 请参阅https://github.com/influxdata/influxdb/issues/8016

转到版本 - 1.7.5 Git版本 - 2.11.1 Hg版本 - 3.7.1

cd c:\go
mkdir projects
set "GOPATH=C:\Go\projects"
cd %gopath%
git config --global http.proxy http://user:enc_pw@IP:port
set https_proxy=https://user:enc_pw@IP:port
go get github.com/sparrc/gdm
go get github.com/influxdata/influxdb
cd src\github.com\influxdata\influxdb
go get -v -u -f ./...
C:\Go\projects\bin\gdm restore
go install ./...
go build ./...

这应有助于有效解决所有问题,您可以继续使用原始链接