Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

安装报错,求解 #64

Open
yushengme opened this issue Jan 19, 2019 · 31 comments
Open

安装报错,求解 #64

yushengme opened this issue Jan 19, 2019 · 31 comments

Comments

@yushengme
Copy link

Shell 您好!

我按照 readme 中的安装步骤进行操作,到 go get -u github.com/shell909090/influx-proxy/service 这一步时,出现错误:

$ go get -u github.com/shell909090/influx-proxy/service
package github.com/influxdata/influxdb/client/v2: cannot find package "github.com/influxdata/influxdb/client/v2" in any of:
/usr/lib/go/src/github.com/influxdata/influxdb/client/v2 (from $GOROOT)
/home/test/go/src/github.com/influxdata/influxdb/client/v2 (from $GOPATH)

我对 go 不太熟悉,请问遇到这种问题,应该如何处理?

谢谢您!

@yushengme yushengme changed the title 安装 安装报错,求解 Jan 19, 2019
@shell909090
Copy link
Owner

你试试go get -u github.com/influxdata/influxdb/client/v2

@yushengme
Copy link
Author

$ go get -u github.com/influxdata/influxdb/client/v2
package github.com/influxdata/influxdb/client/v2: cannot find package "github.com/influxdata/influxdb/client/v2" in any of:
/usr/lib/go/src/github.com/influxdata/influxdb/client/v2 (from $GOROOT)
/home/ys/go/src/github.com/influxdata/influxdb/client/v2 (from $GOPATH)

还是报了同样的错误。。。

@shell909090
Copy link
Owner

不好意思,请稍等两天。昨天刚刚飞到北美,在调时差。调过来我看一下。很奇怪之前编译的时候没碰到这类问题。

@ljhmily
Copy link

ljhmily commented Jan 23, 2019

相同的错误

@ljhmily
Copy link

ljhmily commented Jan 23, 2019

influx git主版本移除了client/v2的路径

@shell909090
Copy link
Owner

我还在倒时差。不过看到上面这句,倒是解释了为什么会出现这个问题。
这个问题暂时没法解决。原则上我们应该用vender去固定上游版本,但是和proxy相比influx上游实在太大了点。另一个办法是把相关的metric结构拷贝过来。或者,救急也可以删除metric相关代码。但是我现在都没有时间来处理,最快要等到Feb 15了。

@ljhmily
Copy link

ljhmily commented Jan 24, 2019

我还在倒时差。不过看到上面这句,倒是解释了为什么会出现这个问题。
这个问题暂时没法解决。原则上我们应该用vender去固定上游版本,但是和proxy相比influx上游实在太大了点。另一个办法是把相关的metric结构拷贝过来。或者,救急也可以删除metric相关代码。但是我现在都没有时间来处理,最快要等到Feb 15了。

可以直接下载整个influxdb仓库, 并将版本切换到1.7, 然后本地编译安装

@alisanguo
Copy link

这个问题还没解决吗

@shell909090
Copy link
Owner

没,这两天在倒腾docker升级...CVE...没法停...

shell909090 added a commit that referenced this issue Feb 18, 2019
remove influx client from code (Close: #64)
@shell909090
Copy link
Owner

@yushengme @ljhmily @alisanguo 我推了一个commit到dev分支上,麻烦测一下,看看有没有解决。

@strongit
Copy link

@shell909090 window下可以install linux报错如下:
influx-proxy/service/main.go:16:2: cannot find package "gopkg.in/natefinch/lumberjack.v2" in any of: /usr/local/go/src/gopkg.in/natefinch/lumberjack.v2 (from $GOROOT) /app/go/src/gopkg.in/natefinch/lumberjack.v2 (from $GOPATH) influx-proxy/backend/config.go:14:2: cannot find package "gopkg.in/redis.v5" in any of: /usr/local/go/src/gopkg.in/redis.v5 (from $GOROOT) /app/go/src/gopkg.in/redis.v5 (from $GOPATH)

@shell909090
Copy link
Owner

shell909090 commented Feb 21, 2019

@strongit 大哥,依赖没装。几天前改代码的时候,这几个依赖还是在的。您先装一下依赖。

@strongit
Copy link

@shell909090 嗯嗯 这台机器连不上网络,手动安装了下

@hardbone12
Copy link

v1的client在这 "https://github.com/influxdata/influxdb1-client"

@shell909090
Copy link
Owner

thx.
BTW, dev版应该解决了这个问题

nalsas pushed a commit to nalsas/influx-proxy that referenced this issue Apr 22, 2019
@nmonz
Copy link

nmonz commented May 7, 2019

@shell909090 @strongit @ljhmily 移除代码中的还需要重新编译?

@shell909090
Copy link
Owner

@nmonz
Copy link

nmonz commented May 7, 2019

@shell909090 那当前这个问题还只能通过修改代码来解决? 而且其中那些+和- 是指增加内容和删除内容?

@shell909090
Copy link
Owner

目前只有dev分支解决了这个问题。没有人回报测试通过前,我又不敢合并。

@nmonz
Copy link

nmonz commented May 7, 2019

@shell909090 那在远程获取的时候(go get -u ),如何指定dev分支去获取呢?

@shell909090
Copy link
Owner

没办法,本地编译吧。
祈祷哪位好心人测试一下dev分支是不是稳定了。

@nmonz
Copy link

nmonz commented May 10, 2019

@shell909090 那直接下载到本地 不用相关influxdb的东西吗?

@shell909090
Copy link
Owner

dev分支里移除了influxdb的相关依赖。redis等其他依赖不变。

@www6223166
Copy link

我的安装到go get -u github.com/shell909090/influx-proxy/service这一步,直接就没反应,是什么情况,本地环境都有,github也能ping通,求指教

@shell909090
Copy link
Owner

奇怪,应该报错啊。为啥没报错呢...

@www6223166
Copy link

/root/go/src/github.com/shell909090/influx-proxy/monitor/metric.go:6:2: cannot find package "github.com/influxdata/influxdb/client/v2" in any of:
/local/gohome/go/src/github.com/influxdata/influxdb/client/v2 (from $GOROOT)
/root/go/src/github.com/influxdata/influxdb/client/v2 (from $GOPATH)
/root/go/src/github.com/shell909090/influx-proxy/service/main.go:16:2: cannot find package "gopkg.in/natefinch/lumberjack.v2" in any of:
/local/gohome/go/src/gopkg.in/natefinch/lumberjack.v2 (from $GOROOT)
/root/go/src/gopkg.in/natefinch/lumberjack.v2 (from $GOPATH)
/root/go/src/github.com/shell909090/influx-proxy/backend/config.go:14:2: cannot find package "gopkg.in/redis.v5" in any of:
/local/gohome/go/src/gopkg.in/redis.v5 (from $GOROOT)
/root/go/src/gopkg.in/redis.v5 (from $GOPATH)
我也报这个错,1.7的下载下来的,如何安装啊,求指教

@shell909090
Copy link
Owner

@www6223166 我看到你在另一个issue里面已经close了,没问题了么?

@www6223166
Copy link

@shell909090 是的,我已经用上面那位老哥的方法把1.7下载到本地,编译解决了,但是遇到了新问题,我提了issue,麻烦看一下,万分感谢

@lxy597
Copy link

lxy597 commented Jul 25, 2019

influxdata/influxdb#11035
问题还在
解决办法:
go get - u github.com/influxdata/influxdb1-client (新的依赖地址)
go get -u github.com/shell909090/influx-proxy/service
报错之后
找到(go env)$GOPATH/src/github.com/shell909090/influx-proxy/monitor/metric.go
修改为 client "github.com/influxdata/influxdb1-client/v2"
到$GOPATH/src/github.com/shell909090/influx-proxy/service目录 go install 然后步骤就顺了

@zhangyang1995
Copy link

influxdata/influxdb#11035
问题还在
解决办法:
go get - u github.com/influxdata/influxdb1-client (新的依赖地址)
go get -u github.com/shell909090/influx-proxy/service
报错之后
找到(go env)$GOPATH/src/github.com/shell909090/influx-proxy/monitor/metric.go
修改为 client "github.com/influxdata/influxdb1-client/v2"
到$GOPATH/src/github.com/shell909090/influx-proxy/service目录 go install 然后步骤就顺了

我按照您的步骤执行了。
后面出现了这个
[root@master service]# go install
main.go:16:2: cannot find package "gopkg.in/natefinch/lumberjack.v2" in any of:
/data/go/src/gopkg.in/natefinch/lumberjack.v2 (from $GOROOT)
/data/gopath/src/gopkg.in/natefinch/lumberjack.v2 (from $GOPATH)
../backend/config.go:14:2: cannot find package "gopkg.in/redis.v5" in any of:
/data/go/src/gopkg.in/redis.v5 (from $GOROOT)
/data/gopath/src/gopkg.in/redis.v5 (from $GOPATH)
我没弄过go 这样是少了包吗 我需要在哪里安装?

@shell909090
Copy link
Owner

influxdata/influxdb#11035
问题还在
解决办法:
go get - u github.com/influxdata/influxdb1-client (新的依赖地址)
go get -u github.com/shell909090/influx-proxy/service
报错之后
找到(go env)$GOPATH/src/github.com/shell909090/influx-proxy/monitor/metric.go
修改为 client "github.com/influxdata/influxdb1-client/v2"
到$GOPATH/src/github.com/shell909090/influx-proxy/service目录 go install 然后步骤就顺了

我按照您的步骤执行了。
后面出现了这个
[root@master service]# go install
main.go:16:2: cannot find package "gopkg.in/natefinch/lumberjack.v2" in any of:
/data/go/src/gopkg.in/natefinch/lumberjack.v2 (from $GOROOT)
/data/gopath/src/gopkg.in/natefinch/lumberjack.v2 (from $GOPATH)
../backend/config.go:14:2: cannot find package "gopkg.in/redis.v5" in any of:
/data/go/src/gopkg.in/redis.v5 (from $GOROOT)
/data/gopath/src/gopkg.in/redis.v5 (from $GOPATH)
我没弄过go 这样是少了包吗 我需要在哪里安装?

这个是redis的包没装...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants