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 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题