Vim-go: GoInstallBinaries err while install

Created on 29 Jun 2019  路  8Comments  路  Source: fatih/vim-go

What did you do? (required: The issue will be closed when not provided)


  1. git clone https://github.com/fatih/vim-go.git ~/.vim/pack/plugins/start/vim-go
  2. start vim
  3. execute :GoInstallBinaries
    after that, it displays some error like this:

vim-go: gogetdoc not found. Installing github.com/zmb3/gogetdoc to folder /home/sydnash/go/bin/
Error detected while processing function 23_GoInstallBinaries[125]..25_remove:
line 1:
E488: Trailing characters
vim-go: guru not found. Installing golang.org/x/tools/cmd/guru to folder /home/sydnash/go/bin/

What did you expect to happen?

this will install vim-go dependence atuo.

What happened instead?

report a error after install gogetdoc

Configuration (MUST fill this out):

new install ubuntu, only install git go and vim.

vim-go version:

clone from git, latest commit on master
7aa035a7d2eaa47c472c24f810225e949f3cd90d

vimrc you used to reproduce (use a minimal vimrc with other plugins disabled; do not link to a 2,000 line vimrc):

no curstom vimrc

Vim version (first three lines from :version):


VIM - Vi IMproved version 8.0.1453

Go version (go version):


go version go1.12.5 linux/amd64

Go environment

go env Output:

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/sydnash/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/sydnash/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build289692715=/tmp/go-build -gno-record-gcc-switches"

Most helpful comment

@bhcleek does this help?

vim-go: gopls not found. Installing golang.org/x/tools/gopls@latest to folder /Users/joe/bin
chdir(/var/folders/3g/1pfxpl_d7fn0ctd_5hs7y_180000gn/T//vim-go7ed526bf8f43f497315de7a17410acf69dd6f11a46415010db8720ee907be21f)
/private/var/folders/3g/1pfxpl_d7fn0ctd_5hs7y_180000gn/T/vim-go7ed526bf8f43f497315de7a17410acf69dd6f11a46415010db8720ee907be21f
Calling shell to execute: "('/usr/local/bin/go' 'get' '-v' 'golang.org/x/tools/gopls@latest') >/var/folders/3g/1pfxpl_d7fn0ctd_5hs7y_180000gn/T/vaWEEHO/11 2>&1"

Error installing golang.org/x/tools/gopls@latest: go: cannot find main module; see 'go help modules'

After reading this I tried running go get -v golang.org/x/tools/gopls, which succeeded, and now everything seems to work.

All 8 comments

Can you run :15verbose GoInstallBinaries and provide its output. If you don't get an error, then run :15verbose GoUpdateBinaries instead.

edit: fixed the alternative command to include the leading :.

Having the same issue. @bhcleek, is there an easy way to capture the output from :15verbose GoInstallBinaries? Right now it looks like I need to hold spacebar to keep scrolling with --More--, and it's pages upon pages of code.

It's going to be a lot of code. You can probably use a lower verbosity if needed. Alternatively, just install one of the binaries needed (e.g. 15verbose GoInstallBinaries gogetdoc).

@bhcleek does this help?

vim-go: gopls not found. Installing golang.org/x/tools/gopls@latest to folder /Users/joe/bin
chdir(/var/folders/3g/1pfxpl_d7fn0ctd_5hs7y_180000gn/T//vim-go7ed526bf8f43f497315de7a17410acf69dd6f11a46415010db8720ee907be21f)
/private/var/folders/3g/1pfxpl_d7fn0ctd_5hs7y_180000gn/T/vim-go7ed526bf8f43f497315de7a17410acf69dd6f11a46415010db8720ee907be21f
Calling shell to execute: "('/usr/local/bin/go' 'get' '-v' 'golang.org/x/tools/gopls@latest') >/var/folders/3g/1pfxpl_d7fn0ctd_5hs7y_180000gn/T/vaWEEHO/11 2>&1"

Error installing golang.org/x/tools/gopls@latest: go: cannot find main module; see 'go help modules'

After reading this I tried running go get -v golang.org/x/tools/gopls, which succeeded, and now everything seems to work.

@pyro2927 it looks like you're using go 1.11. If you'll update, I believe your problem will disappear. The error that @sydnash reported is different than what you're seeing.

with :15verbose GoInstallBinaries, there is no error reported.

Getting the same errors...

I had all the same issues. I had installed golang via homebrew. Running go install commands via bash turned up an error in go. I was able to upgrade golang via homebrew then the issues went away.

Turns out old version of Golang was the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andrejvanderzee picture andrejvanderzee  路  3Comments

surest picture surest  路  3Comments

SirmaXX picture SirmaXX  路  3Comments

wpaulino picture wpaulino  路  4Comments

svanharmelen picture svanharmelen  路  3Comments