安装confd时候包config.go:76:24: config.Endpoint undefined (type Config has no field or method Endpoint)

confd is a lightweight configuration management tool focused on: keeping local configuration files up-to-date using data stored in etcd, consul, dynamodb, redis, vault, zookeeper,...

confd is a lightweight configuration management tool focused on:

 confd 安装需要依赖golang的源码的,官方安装教程如下:


Building

Go 1.10 is required to build confd, which uses the new vendor directory.

$ mkdir -p $GOPATH/src/github.com/kelseyhightower
$ git clone https://github.com/kelseyhightower/confd.git $GOPATH/src/github.com/kelseyhightower/confd
$ cd $GOPATH/src/github.com/kelseyhightower/confd
$ make

You should now have confd in your bin/ directory:

$ ls bin/
confd


结果安装的编译的时候报如下错误:

# _/src/github.com/kelseyhightower/confd

./config.go:76:24: config.Endpoint undefined (type Config has no field or method Endpoint)

./config.go:77:24: config.Group undefined (type Config has no field or method Group)

./config.go:78:24: config.Namespace undefined (type Config has no field or method Namespace)

./config.go:79:24: config.AccessKey undefined (type Config has no field or method AccessKey)

./config.go:80:24: config.SecretKey undefined (type Config has no field or method SecretKey)

./config.go:81:22: config.OpenKMS undefined (type Config has no field or method OpenKMS)

./config.go:82:24: config.RegionId undefined (type Config has no field or method RegionId)

make: *** [build] Error 2


原来系统上没有golang,yum install -y golang.x86_64

安装完成后, $GOPATH 路径为空,没有显示设置,其实默认安装 golang的源码路径在 /usr/lib/golang/src 所以,可以显示设置

$GOPATH=/usr/lib/golang 然后按上述编译即可完成。



  • 发表于 2019-08-23 00:12
  • 阅读 ( 64 )

你可能感兴趣的文章

相关问题

0 条评论

请先 登录 后评论
shitian
shitian

662 篇文章

作家榜 »

  1. shitian 662 文章
  2. 石天 437 文章
  3. 每天惠23 33 文章
  4. 小A 29 文章