安装beego工具bee报错 go: github.com/derekparker/delve@v1.2.0: parsing go.mod: unexpected module path "

所遇问题:

在mac环境下安装bee工具的时候报错

go get github.com/beego/bee
go: finding github.com/derekparker/delve/service/rpccommon latest
go: finding github.com/derekparker/delve/service latest
go: finding github.com/derekparker/delve/terminal latest
go: finding github.com/derekparker/delve/service/rpc2 latest
go: github.com/derekparker/delve@v1.2.0: parsing go.mod: unexpected module path "github.com/go-delve/delve"
go: error loading module requirements

go get github.com/beego/bee                                                                                    
go: finding github.com/derekparker/delve/service/rpccommon latest
go: finding github.com/derekparker/delve/service latest
go: finding github.com/derekparker/delve/terminal latest
go: finding github.com/derekparker/delve/service/rpc2 latest
go: github.com/derekparker/delve@v1.2.0: parsing go.mod: unexpected module path "github.com/go-delve/delve"
go: error loading module requirements

解决办法:
一、创建一个 go mod 下的文件夹

mkdir test
cd test
go mod init test

二、在 go.mod 内把 bee 的源替换掉,如下所示:

github.com/realguan/bee 是我 fork 了 github.com/beego/bee 的源码,进行了源代码更改:

module test
replace github.com/beego/bee v1.10.0 => github.com/realguan/bee v1.12.1
go 1.12

三、开始正式安装 beego 和 bee

export GOPROXY=https://goproxy.io    
go get -u github.com/astaxie/beego
go get -u github.com/beego/bee

以上如果没报错,那就成功了。

 

上一篇:痞子衡嵌入式:MCUBootUtility v2.0来袭,i.MXRT1010哪里跑


下一篇:(三): 深入了解Bee框架的配置