搭建go开发环境时,出现GoSublime error: MarGo build failed的问题 - Go语言中文社区

搭建go开发环境时,出现GoSublime error: MarGo build failed的问题


在安装问go语言开发工具,Sublime Text Build 3083之后,再安装gocode和margo时,在安装margo那一步卡住了,出现了以下问题:


GoSublime error: MarGo build failed
|                > This is possibly a bug or miss-configuration of your environment.
|                > For more help, please file an issue with the following build output
|                > at: https://github.com/DisposaBoy/GoSublime/issues/new
|                > or alternatively, you may send an email to: gosublime@dby.me
|                > 
|                > 
|                > cmd: `['D:\Program Files\Go\bin\go.exe', 'build', '-v', '-x', '-o', 'gosublime.margo_r14.12.06-1_go1.4.2.exe', 'gosubli.me/margo']`
|                > stdout: ``
|                > stderr: `WORK=~AppDataLocalTempgo-build300617651
|                > runtime
|                > go build runtime: windows/amd64 must be bootstrapped using make.bat`
|                > exception: `None`
|   install state: busy
| sublime.version: 3083
| sublime.channel: stable
|       about.ann: a14.02.25-1
|   about.version: r14.12.06-1
|         version: r14.12.06-1
|        platform: windows-x64
|            ~bin: D:softwaresublime textSublime Text Build 3083 x64DataPackagesUserGoSublimewindows-x64bin
|       margo.exe: ~bingosublime.margo_r14.12.06-1_go1.4.2.exe (missing)
|          go.exe: D:Program FilesGobingo.exe (ok)
|      go.version: go1.4.2
|          GOROOT: D:Program FilesGo
|          GOPATH: H:/go/development
|           GOBIN: (not set) (should usually be `(not set)`)
|       set.shell: []
|       env.shell: 
|       shell.cmd: ['C:\Windows\system32\cmd.exe', '/C', '${CMD}']


关键在于:
MarGo build failed
go get github.com/DisposaBoy/MarGo 之后才知道,这个工具已经被作者清理了,因此在github上搜索 MarGo之后,有几个结果


我选择了第一个搜索结果,(安装完之后可以使用但是和原来的MarGo的具体区别还没研究),可以使用这句语句在命令行输入go get github.com/slene/margo来安装


,安装完成之后在GOPATH目录下的bin文件夹会生成margo.exe的可执行文件,再将该可执行文件拷贝到Sublime Text 3083安装路径DataPackagesUserGoSublimewindows-x64bin下,并将文件名改为以下标为红色字的名字

<pre name="code" class="plain">               > cmd: `['D:\Program Files\Go\bin\go.exe', 'build', '-v', '-x', '-o', '<span style="color:#ff0000;">gosublime.margo_r14.12.06-1_go1.4.2.exe</span>', 'gosubli.me/margo']`

以下是我的电脑上的路径,仅供参考


重新启动sublime Text 3083即可



版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/QUBUBING/article/details/48274233
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2020-03-08 10:53:32
  • 阅读 ( 1496 )
  • 分类:Go

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢