dongtan6336 2017-05-23 18:20
浏览 76
已采纳

使用dep init时不在任何GOPATH中

I'm trying to use godep to install my dependencies but I can't seem to get it to work. When I run GODEP init, I get the following error

determineProjectRoot: /home/cjds/development/core/data-service not in any $GOPATH

But my GOPATH definitely contains that path. This is my whole go path

/home/cjds/development/core/data-service

go install causes the following error, which may be the root of the problem:

no buildable Go source files in /home/cjds/development/core/data-service

The folder structure however has a src folder, and then a main folder and then my whole Go project

-/home/cjds/development/core/data-service/src/main/my-go-files.go

  • 写回答

1条回答 默认 最新

  • douxian9010 2017-05-23 18:23
    关注

    Your GOPATH points to a root directory containing bin, pkg, and src subdirectories, with project source under src. Tools like godep and go install expect to operate on source, not on your entire GOPATH, so must be run on some path under $GOPATH/src.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器