VS Code Error: Error: spawn EACCES in *.go files

Hey community! :wink:

I have problem with my VS Code for a very long time. I’ve used Goland so fat but I’d rather be able to use VS Code as well. I getting error always when I save or open the .go file:

Error: Error: spawn EACCES

The problem occurs only in *.go files

I use this plugin. When I turn off plugin = all works fine butdon’t have code hints.

Any ideas for repair this? :disappointed_relieved:

Which operating system are you using?

Oh, sorry! Linux Mint 19.

Could you try this: https://github.com/Microsoft/vscode-go/wiki/Go-tools-that-the-Go-extension-depends-on Maybe one of the tools is missing

1 Like

Nice tip. I installed these tools again. Unfortunately this is not solve the problem. Earlier on Ubuntu 18.04 LTS there was no problem. He appeared on Mint 19.

Sorry for post under the post but I think I found the problem.

Analysis Tools Missing

I trying to install these tools again. But I getting some errors from output.

Installing 2 tools at /home/xhexe/go/bin
gocode-gomod
godef-gomod

Installing github.com/stamblerre/gocode FAILED
Installing github.com/ianthehat/godef FAILED

2 tools failed to install.

gocode-gomod:
Error: Command failed: /usr/local/go/bin/go get -u -v -d github.com/stamblerre/gocode
github.com/stamblerre/gocode (download)
# cd /home/xhexe/go/src/github.com/stamblerre/gocode; git pull --ff-only
fatal: unable to access 'https://github.com/stamblerre/gocode/': Could not resolve host: github.com
package github.com/stamblerre/gocode: exit status 1
github.com/stamblerre/gocode (download)
# cd /home/xhexe/go/src/github.com/stamblerre/gocode; git pull --ff-only
fatal: unable to access 'https://github.com/stamblerre/gocode/': Could not resolve host: github.com
package github.com/stamblerre/gocode: exit status 1

godef-gomod:
Error: Command failed: /usr/local/go/bin/go get -u -v -d github.com/ianthehat/godef
github.com/ianthehat/godef (download)
Fetching https://golang.org/x/tools/go/ast/astutil?go-get=1
Parsing meta tags from https://golang.org/x/tools/go/ast/astutil?go-get=1 (status code 200)
get "golang.org/x/tools/go/ast/astutil": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools/go/ast/astutil?go-get=1
get "golang.org/x/tools/go/ast/astutil": 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)
# cd /home/xhexe/go/src/golang.org/x/tools; git pull --ff-only
error: Your local changes to the following files would be overwritten by merge:
	cmd/godoc/setup-godoc-app.bash
Please commit your changes or stash them before you merge.
Aborting
package golang.org/x/tools/go/ast/astutil: exit status 1
Fetching https://golang.org/x/tools/go/packages?go-get=1
Parsing meta tags from https://golang.org/x/tools/go/packages?go-get=1 (status code 200)
get "golang.org/x/tools/go/packages": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools/go/packages?go-get=1
get "golang.org/x/tools/go/packages": verifying non-authoritative meta tag
package golang.org/x/tools/go/packages: cannot find package "golang.org/x/tools/go/packages" in any of:
	/usr/local/go/src/golang.org/x/tools/go/packages (from $GOROOT)
	/home/xhexe/go/src/golang.org/x/tools/go/packages (from $GOPATH)
Fetching https://golang.org/x/tools/go/types/typeutil?go-get=1
Parsing meta tags from https://golang.org/x/tools/go/types/typeutil?go-get=1 (status code 200)
get "golang.org/x/tools/go/types/typeutil": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools/go/types/typeutil?go-get=1
get "golang.org/x/tools/go/types/typeutil": verifying non-authoritative meta tag
github.com/ianthehat/godef (download)
Fetching https://golang.org/x/tools/go/ast/astutil?go-get=1
Parsing meta tags from https://golang.org/x/tools/go/ast/astutil?go-get=1 (status code 200)
get "golang.org/x/tools/go/ast/astutil": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools/go/ast/astutil?go-get=1
get "golang.org/x/tools/go/ast/astutil": 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)
# cd /home/xhexe/go/src/golang.org/x/tools; git pull --ff-only
error: Your local changes to the following files would be overwritten by merge:
	cmd/godoc/setup-godoc-app.bash
Please commit your changes or stash them before you merge.
Aborting
package golang.org/x/tools/go/ast/astutil: exit status 1
Fetching https://golang.org/x/tools/go/packages?go-get=1
Parsing meta tags from https://golang.org/x/tools/go/packages?go-get=1 (status code 200)
get "golang.org/x/tools/go/packages": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools/go/packages?go-get=1
get "golang.org/x/tools/go/packages": verifying non-authoritative meta tag
package golang.org/x/tools/go/packages: cannot find package "golang.org/x/tools/go/packages" in any of:
	/usr/local/go/src/golang.org/x/tools/go/packages (from $GOROOT)
	/home/xhexe/go/src/golang.org/x/tools/go/packages (from $GOPATH)
Fetching https://golang.org/x/tools/go/types/typeutil?go-get=1
Parsing meta tags from https://golang.org/x/tools/go/types/typeutil?go-get=1 (status code 200)
get "golang.org/x/tools/go/types/typeutil": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools/go/types/typeutil?go-get=1
get "golang.org/x/tools/go/types/typeutil": verifying non-authoritative meta tag

After each closing VSCode and reopening I getting

Analysis Tools Missing

You seem to have some error with your network or DNS-settings

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.