dougui5419 2019-08-02 15:31
浏览 353
已采纳

使用GO111MODULE安装水牛会导致go get:错误加载模块要求[重复]

This question already has an answer here:

I am getting an error when trying to install buffalo.

I tested with a clean GOPATH with nothing in it on go version go1.12.7 linux/amd64. GO111MODULE ist set to on.

I try to install buffalo with the command given on the website:

go get -u -v github.com/gobuffalo/buffalo/buffalo

Executing the command results in return code 1 and the error message on the end of the verbose output seems to be go get: error loading module requirements.

</div>
  • 写回答

1条回答 默认 最新

  • duanqie8549 2019-08-02 17:55
    关注

    Try without the -u. This works for me:

    $ cd $(mktemp -d)
    $ go mod init example.com/tempmod
    $ go get github.com/gobuffalo/buffalo/buffalo
    

    Do those steps work for you?

    Some more on -u from the modules wiki:

    A common mistake is thinking go get -u foo solely gets the latest version of foo. In actuality, the -u in go get -u foo or go get -u foo@latest means to also get the latest versions for all of the direct and indirect dependencies of foo. A common starting point when upgrading foo is instead to do go get foo or go get foo@latest without a -u (and after things are working, consider go get -u=patch foo, go get -u=patch, go get -u foo, or go get -u).

    Also, with your original command, you were very likely seeing a more specific error earlier in the output. If you run without -v to reduce the noise and then ignore the "finding", "downloading", and "extracting" messages, there is probably a more specific error there.

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

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 R语言卸载之后无法重装,显示电脑存在下载某些较大二进制文件行为,怎么办
  • ¥15 java 的protected权限 ,问题在注释里