Windows 上的 InfluxDB 安装问题

InfluxDB installation issue on Windows

参照 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

我该如何解决这个问题?

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

按照您提到的 link 的第二个答案(作者:Xavier Peña)

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

下载 pre-built 二进制文件

解决方案 参考https://github.com/influxdata/influxdb/issues/8016

转到版本 - 1.7.5 Git 版本 - 2.11.1 汞版本 - 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 ./...

这应该有助于有效解决所有问题,您可以继续原来的link