2

我正在尝试govendor使用命令安装
go get -u github.com/kardianos/govendor

但每次我得到以下

# 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

我正在使用带有以下环境的 golang 版本 1.9 linux/amd64:

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"

是什么导致了这些问题?谢谢

4

1 回答 1

1

我已经解决了清理$GOPATH/pkg文件夹然后重新执行的问题:
go get -u github.com/kardianos/govendor

于 2017-09-04T14:44:21.850 回答