這是一個建立於
的文章,其中的資訊可能已經有所發展或是發生改變。
在安裝問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即可