英文:
InfluxDB installation issue on Windows
问题
根据你提供的信息,你在安装InfluxDB时遇到了问题。具体错误信息如下:
# 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
这些错误是由于缺少zap.NullEncoder
的定义导致的。为了解决这个问题,你可以尝试更新或重新安装InfluxDB的依赖项。你可以使用以下命令更新依赖项:
go get -u -f ./...
如果问题仍然存在,你可以尝试查看InfluxDB的文档或在相关的开发者社区中提问以获取更多帮助。
英文:
In reference to
https://stackoverflow.com/questions/26116711/how-to-install-influxdb-in-windows
I've followed all the steps upto:
go get -u -f ./...
But am facing an issue as below
# 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
How can I fix this?
答案1
得分: 0
以下是翻译好的内容:
去获取 -u github.com/influxdata/influxdb/...
按照你提到的链接中的第二个答案(由Xavier Peña提供)进行操作。
或者从https://portal.influxdata.com/downloads下载预编译的二进制文件。
英文:
go get -u github.com/influxdata/influxdb/...
follow the second answer from the link you mentined (by Xavier Peña)
Or download pre-built binary from https://portal.influxdata.com/downloads
答案2
得分: 0
解决方案
请参考 https://github.com/influxdata/influxdb/issues/8016
Go版本 - 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 ./...
这样应该能有效解决所有问题,然后你可以继续使用原始链接。
英文:
Solution
Refer to https://github.com/influxdata/influxdb/issues/8016
Go version - 1.7.5
Git version - 2.11.1
Hg version - 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 ./...
This should help to effectively solve all the problems and you may continue with original link
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论