搭建go開發環境時,出現GoSublime error: MarGo build failed的問題

來源:互聯網
上載者:User
這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。

在安裝問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=~\AppData\Local\Temp\go-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:\software\sublime text\Sublime Text Build 3083 x64\Data\Packages\User\GoSublime\windows-x64\bin|       margo.exe: ~bin\gosublime.margo_r14.12.06-1_go1.4.2.exe (missing)|          go.exe: D:\Program Files\Go\bin\go.exe (ok)|      go.version: go1.4.2|          GOROOT: D:\Program Files\Go|          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安裝路徑Data\Packages\User\GoSublime\windows-x64\bin下,並將檔案名稱改為以下標為紅色字的名字

<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即可



聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.