golang - "not a package file" after "go get -u" from github

895 Views Asked by At

I am tryng to install govendor using the command
go get -u github.com/kardianos/govendor

but everytime I get the following

# github.com/kardianos/govendor/cliprompt
go/src/github.com/kardianos/govendor/cliprompt/cliPrompt.go:13:2: import /home/pelli/go/pkg/linux_amd64/github.com/kardianos/govendor/prompt.a: not a package file

# github.com/kardianos/govendor/context
go/src/github.com/kardianos/govendor/context/context.go:18:2: import /home/pelli/go/pkg/linux_amd64/github.com/kardianos/govendor/internal/pathos.a: not a package file

I am using golang version 1.9 linux/amd64 with the following env:

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/pelli/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build215462614=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

What is causing these issues? Thank you

1

There are 1 best solutions below

0
On

I have solved cleaning my $GOPATH/pkg folder and then re-executing:
go get -u github.com/kardianos/govendor