dshfjsh_5455 2017-03-28 20:52
浏览 187
已采纳

使用govendor,dh-make-golang构建Go 1.7项目时,会出现导入供应商依赖性的问题

I've been looking into building a go project into a debian package.

I've looked into dh-make-golang and I have a nice and shiny debian folder set up in my repository. When I try to use gbp buildpackage --git-pbuilder though it errors out due to all of my dependencies not being found. It seems that dh-make-golang ignores the vendor folder when it copies everything from my project's git repository, and I use govendor so all of my dependencies are in there.

How can I resolve this dependency issue and build the project as a .deb package properly? For reference, the error I am getting is:

src/github.com/project/project/project.go:15:2: cannot find package "google.golang.org/grpc/grpclog" in any of: /usr/lib/go-1.7/src/google.golang.org/grpc/grpclog (from $GOROOT) /tmp/project/obj-x86_64-linux-gnu/src/google.golang.org/grpc/grpclog (from $GOPATH)

  • 写回答

2条回答 默认 最新

  • douhong6187 2017-03-29 14:29
    关注

    Issue was a bug in dh-make-golang regarding importing vendor dependencies. It was just fixed today.

    https://github.com/Debian/dh-make-golang/issues/46

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部