<p>I can't find working fix to the error log shown below, it occurs after writting any code in with Go format on VS Code, wich triggers a suggestion to install the needed tools for the extension to be fully functional (note that GOPATH is set, and Golang is installed in PATH):</p>
<pre><code>Installing 12 tools
gocode
gopkgs
go-outline
go-symbols
guru
gorename
gomodifytags
impl
godef
golint
gotests
dlv
Installing gocode FAILED
Installing gopkgs FAILED
Installing go-outline FAILED
Installing go-symbols FAILED
Installing guru FAILED
Installing gorename FAILED
Installing gomodifytags FAILED
Installing impl FAILED
Installing godef FAILED
Installing golint FAILED
Installing gotests FAILED
Installing dlv FAILED
12 tools failed to install.
gocode:
Error: Command failed: C:\Go\bin\go.exe get -u -v github.com/nsf/gocode
github.com/nsf/gocode (download)
go: missing Git command. See https://golang.org/s/gogetcmd
package github.com/nsf/gocode: exec: "git": executable file not found in %PATH%
github.com/nsf/gocode (download)
go: missing Git command. See https://golang.org/s/gogetcmd
package github.com/nsf/gocode: exec: "git": executable file not found in %PATH%
gopkgs:
Error: Command failed: C:\Go\bin\go.exe get -u -v github.com/tpng/gopkgs
github.com/tpng/gopkgs (download)
go: missing Git command. See https://golang.org/s/gogetcmd
package github.com/tpng/gopkgs: exec: "git": executable file not found in %PATH%
github.com/tpng/gopkgs (download)
go: missing Git command. See https://golang.org/s/gogetcmd
package github.com/tpng/gopkgs: exec: "git": executable file not found in %PATH%
go-outline:
Error: Command failed: C:\Go\bin\go.exe get -u -v github.com/ramya-rao-a/go-outline
github.com/ramya-rao-a/go-outline (download)
go: missing Git command. See https://golang.org/s/gogetcmd
package github.com/ramya-rao-a/go-outline: exec: "git": executable file not found in %PATH%
github.com/ramya-rao-a/go-outline (download)
go: missing Git command. See https://golang.org/s/gogetcmd
package github.com/ramya-rao-a/go-outline: exec: "git": executable file not found in %PATH%
go-symbols:
Error: Command failed: C:\Go\bin\go.exe get -u -v github.com/acroca/go-symbols
github.com/acroca/go-symbols (download)
go: missing Git command. See https://golang.org/s/gogetcmd
package github.com/acroca/go-symbols: exec: "git": executable file not found in %PATH%
github.com/acroca/go-symbols (download)
go: missing Git command. See https://golang.org/s/gogetcmd
package github.com/acroca/go-symbols: exec: "git": executable file not found in %PATH%
guru:
Error: Command failed: C:\Go\bin\go.exe get -u -v golang.org/x/tools/cmd/guru
Fetching https://golang.org/x/tools/cmd/guru?go-get=1
Parsing meta tags from https://golang.org/x/tools/cmd/guru?go-get=1 (status code 200)
get "golang.org/x/tools/cmd/guru": found meta tag main.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools/cmd/guru?go-get=1
get "golang.org/x/tools/cmd/guru": verifying non-authoritative meta tag
Fetching https://golang.org/x/tools?go-get=1
Parsing meta tags from https://golang.org/x/tools?go-get=1 (status code 200)
golang.org/x/tools (download)
go: missing Git command. See https://golang.org/s/gogetcmd
package golang.org/x/tools/cmd/guru: exec: "git": executable file not found in %PATH%
Fetching https://golang.org/x/tools/cmd/guru?go-get=1
Parsing meta tags from https://golang.org/x/tools/cmd/guru?go-get=1 (status code 200)
get "golang.org/x/tools/cmd/guru": found meta tag main.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools/cmd/guru?go-get=1
get "golang.org/x/tools/cmd/guru": verifying non-authoritative meta tag
Fetching https://golang.org/x/tools?go-get=1
Parsing meta tags from https://golang.org/x/tools?go-get=1 (status code 200)
golang.org/x/tools (download)
go: missing Git command. See https://golang.org/s/gogetcmd
package golang.org/x/tools/cmd/guru: exec: "git": executable file not found in %PATH%
gorename:
Error: Command failed: C:\Go\bin\go.exe get -u -v golang.org/x/tools/cmd/gorename
Fetching https://golang.org/x/tools/cmd/gorename?go-get=1
Parsing meta tags from https://golang.org/x/tools/cmd/gorename?go-get=1 (status code 200)
get "golang.org/x/tools/cmd/gorename": found meta tag main.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools/cmd/gorename?go-get=1
get "golang.org/x/tools/cmd/gorename": verifying non-authoritative meta tag
Fetching https://golang.org/x/tools?go-get=1
Parsing meta tags from https://golang.org/x/tools?go-get=1 (status code 200)
golang.org/x/tools (download)
go: missing Git command. See https://golang.org/s/gogetcmd
package golang.org/x/tools/cmd/gorename: exec: "git": executable file not found in %PATH%
Fetching https://golang.org/x/tools/cmd/gorename?go-get=1
Parsing meta tags from https://golang.org/x/tools/cmd/gorename?go-get=1 (status code 200)
get "golang.org/x/tools/cmd/gorename": found meta tag main.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools/cmd/gorename?go-get=1
get "golang.org/x/tools/cmd/gorename": verifying non-authoritative meta tag
Fetching https://golang.org/x/tools?go-get=1
Parsing meta tags from https://golang.org/x/tools?go-get=1 (status code 200)
golang.org/x/tools (download)
go: missing Git command. See https://golang.org/s/gogetcmd
package golang.org/x/tools/cmd/gorename: exec: "git": executable file not found in %PATH%
gomodifytags:
Error: Command failed: C:\Go\bin\go.exe get -u -v github.com/fatih/gomodifytags
github.com/fatih/gomodifytags (download)
</code></pre>
<p>go: missing Git command. See <a href="https://golang.org/s/gogetcmd" rel="nofollow">https://golang.org/s/gogetcmd</a>
package github.com/fatih/gomodifytags: exec: "git": executable file not found in %PATH%
github.com/fatih/gomodifytags (download)
go: missing Git command. See <a href="https://golang.org/s/gogetcmd" rel="nofollow">https://golang.org/s/gogetcmd</a>
package github.com/fatih/gomodifytags: exec: "git": executable file not found in %PATH%</p>
<pre><code>impl:
Error: Command failed: C:\Go\bin\go.exe get -u -v github.com/josharian/impl
github.com/josharian/impl (download)
go: missing Git command. See https://golang.org/s/gogetcmd
package github.com/josharian/impl: exec: "git": executable file not found in %PATH%
github.com/josharian/impl (download)
go: missing Git command. See https://golang.org/s/gogetcmd
package github.com/josharian/impl: exec: "git": executable file not found in %PATH%
godef:
Error: Command failed: C:\Go\bin\go.exe get -u -v github.com/rogpeppe/godef
</code></pre>
<p>github.com/rogpeppe/godef (download)
go: missing Git command. See <a href="https://golang.org/s/gogetcmd" rel="nofollow">https://golang.org/s/gogetcmd</a>
package github.com/rogpeppe/godef: exec: "git": executable file not found in %PATH%
github.com/rogpeppe/godef (download)
go: missing Git command. See <a href="https://golang.org/s/gogetcmd" rel="nofollow">https://golang.org/s/gogetcmd</a>
package github.com/rogpeppe/godef: exec: "git": executable file not found in %PATH%</p>
<pre><code>golint:
Error: Command failed: C:\Go\bin\go.exe get -u -v github.com/golang/lint/golint
github.com/golang/lint (download)
go: missing Git command. See https://golang.org/s/gogetcmd
package github.com/golang/lint/golint: exec: "git": executable file not found in %PATH%
github.com/golang/lint (download)
go: missing Git command. See https://golang.org/s/gogetcmd
package github.com/golang/lint/golint: exec: "git": executable file not found in %PATH%
gotests:
Error: Command failed: C:\Go\bin\go.exe get -u -v github.com/cweill/gotests/...
github.com/cweill/gotests (download)
go: missing Git command. See https://golang.org/s/gogetcmd
package github.com/cweill/gotests/...: exec: "git": executable file not found in %PATH%
github.com/cweill/gotests (download)
go: missing Git command. See https://golang.org/s/gogetcmd
package github.com/cweill/gotests/...: exec: "git": executable file not found in %PATH%
dlv:
Error: Command failed: C:\Go\bin\go.exe get -u -v github.com/derekparker/delve/cmd/dlv
</code></pre>
<p>github.com/derekparker/delve (download)
go: missing Git command. See <a href="https://golang.org/s/gogetcmd" rel="nofollow">https://golang.org/s/gogetcmd</a>
package github.com/derekparker/delve/cmd/dlv: exec: "git": executable file not found in %PATH%
github.com/derekparker/delve (download)
go: missing Git command. See <a href="https://golang.org/s/gogetcmd" rel="nofollow">https://golang.org/s/gogetcmd</a>
package github.com/derekparker/delve/cmd/dlv: exec: "git": executable file not found in %PATH%</p>
<hr/>**评论:**<br/><br/>fmpwizard: <pre><p>You need to install git and have it in your path </p></pre>Pra3t0r5: <pre><p>Done, packages installed, but F5 still throws:</p>
<pre><code>Failed to continue: "Cannot find Delve debugger. Install from https://github.com/derekparker/delve & ensure it is in your "GOPATH/bin" or "PATH".
</code></pre>
<p>In fact, dlv was not installed in any of those destinations. And i'm a total noob with github, how i install delve?</p></pre>Pancakepalpatine: <pre><p>Try "go get <a href="https://github.com/derekparker/delve" rel="nofollow">https://github.com/derekparker/delve</a>"</p>
<p>edit: in your terminal, of course.</p></pre>bluepost14: <pre><p>Nope. There's no possible way</p></pre>Pancakepalpatine: <pre><p>Oh no. Oh gosh. If the terminal isn't working, I don't know what to tell you...</p>
<p>If that's true, that means you've been hit with the BlueNexus virus - you're going to need to find/buy another expendable computer, connect both computers with a USB drive, and try to coax the virus into your other PC. You'll know when the virus has switched PCs, because you won't be able to open the terminal on the other computer, but you will be able to open it on your own.</p>
<p>After the virus has jumped ship, update Adobe Flash Player. It's the only thing that can keep the virus from returning to your original computer. If you're up to date, uninstall and reinstall it.</p>
<p>Once the virus is contained on the other PC, you're going to need to find a safe way to dispose of it. BlueNexus is known for jumping airgapped computers - meaning if you throw it away, it could spread to other electronics in the dump and eventually spread into cities. We don't want that.</p>
<p>I recommend filling your tub with hydrochloric acid, and dipping the PC in there for ten minutes at a time. Don't dip for longer than that, or the virus might realize what's going on, and enter hibernation mode. </p>
<p>After you've dipped it ten or more times, you're going to want to ask Siri for the nearest metal foundry or swamp. After 3AM but before 4AM (that's when the NSA satellites install updates and aren't watching) you'll want to dress in all black, drive to the foundry/swamp, and throw the computer in. Before throwing it in, it's advisable to make it as discreet as possible, so that no one finds it and inadvertently releases any of the virus in the future. I recommend covering it in manure.</p>
<p>Drive back home, and make sure to text your wife "hey, got some cream cheese from WalMart" or something like that so you have an alibi in case this ever comes back to bite you.</p>
<p>Hope this helps!</p></pre>zanven42: <pre><p>Do you even have a go path defined? For repos you 'go get' to go too?</p></pre>luckyleprechaun98: <pre><p>Come on. It says exactly what is wrong about 20 times in there. </p></pre>dlsniper: <pre><p>That just shows how bad programmers are at handling errors :D</p></pre>ChristophBerger: <pre><p>When you type <code>git</code> in a command prompt window, do you get an error message? </p>
<p>If git works fine in a command prompt window, try the same in a terminal pane in VSCode. If <code>git</code> fails only there, it seems VSCode somehow reads a different <code>%PATH%</code> variable where the path to <code>git</code> is missing.</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传