zoukankan      html  css  js  c++  java
  • 安装beego工具bee报错 go: github.com/derekparker/delve@v1.2.0: parsing go.mod: unexpected module path "github.com/go-delve/delve"

    所遇问题:

    在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

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

  • 相关阅读:
    Parameter Binding in ASP.NET Web API
    Which HTTP methods match up to which CRUD methods?
    ErrorHandling in asp.net web api
    HttpStatusCode
    Autofac Getting Started(默认的构造函数注入)
    Autofac Controlling Scope and Lifetime
    luvit 被忽视的lua 高性能框架(仿nodejs)
    undefined与null的区别
    VsCode中使用Emmet神器快速编写HTML代码
    字符串匹配---KMP算法
  • 原文地址:https://www.cnblogs.com/wt645631686/p/9748050.html
Copyright © 2011-2022 走看看