go mod模式下安装bee工具出错

安装bee工具的时候 go get -u github.com/beego/bee报错,具体错误如下

go get -u github.com/beego/bee
go: github.com/beego/bee imports
        github.com/beego/bee/cmd imports
        github.com/beego/bee/cmd/commands/dlv imports
        github.com/derekparker/delve/service: github.com/derekparker/[email protected]: parsing go.mod:
        module declares its path as: github.com/go-delve/delve
                but was required as: github.com/derekparker/delve

如实去github查找Issues,发现已经解决了问题,具体原因为

github.com/derekparker/[email protected]这个版本太高了要切换到v0.12.1,并且地址是错误的。但是这个delve v0.12.1版本目前的问题是import的地址是derekparker/delve而项目却切换到了https://github.com/go-delve/delve/,导致无法下载。不是GO111MODULE=off的原因。

查看问题后发现官方已经修复,但是在下载下来的代码依赖还是github.com/derekparker/delve/service,因此需要替换对应依赖就可以安装了

change to go mod and fixbeego#629 #633

最后重新安装

go get -u github.com/beego/bee

安装成功

你可能感兴趣的:(go mod模式下安装bee工具出错)