0
我有我試圖vendorize包。它使用capnproto2軟件包。它建立沒有錯誤時,包是在$ GOPATH/src目錄/ zombiezen.com /去/ capnproto2但是當我移動到我的供應商目錄失敗。我的項目位於我的GOPATH下。go1.7不reconizing供應商目錄
$ go build
../fram/rim/fsd.go:7:8: cannot find package "zombiezen.com/go/capnproto2" in any of:
/home/mjohn/software/go/src/zombiezen.com/go/capnproto2 (from $GOROOT)
/home/mjohn/workspace/gopath/src/zombiezen.com/go/capnproto2 (from $GOPATH)
../fram/rim/schema.capnp.go:7:2: cannot find package "zombiezen.com/go/capnproto2/encoding/text" in any of:
/home/mjohn/software/go/src/zombiezen.com/go/capnproto2/encoding/text (from $GOROOT)
/home/mjohn/workspace/gopath/src/zombiezen.com/go/capnproto2/encoding/text (from $GOPATH)
../fram/rim/schema.capnp.go:8:2: cannot find package "zombiezen.com/go/capnproto2/schemas" in any of:
/home/mjohn/software/go/src/zombiezen.com/go/capnproto2/schemas (from $GOROOT)
/home/mjohn/workspace/gopath/src/zombiezen.com/go/capnproto2/schemas (from $GOPATH)
我的環境:
$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/mjohn/workspace/gopath"
GORACE=""
GOROOT="/home/mjohn/software/go"
GOTOOLDIR="/home/mjohn/software/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build069056451=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
我的項目佈局
$ pwd
/home/mjohn/workspace/gopath/src/mjohn/msg
$ ls
cmd/main.go
cmd/rpc.go
vendor/zombiezen.com/go/capnproto2
顯然還有更多的capnproto2目錄,但這是從$副本GOPATH/src目錄/ zombiezen.com /去/ capnproto2。
爲什麼走,不認識我的供應商目錄中的任何想法?
謝謝。
是否有在'/家庭/ mjohn /工作區/ GOPATH/src目錄/ mjohn /郵件/供應商/ zombiezen.com /去/ capnproto2'路徑上的任何符號鏈接目錄? – JimB
是的,msg目錄是一個符號鏈接。我刪除它,並再次嘗試,但仍然看到同樣的問題。 – dangeroushobo