Closed ameue closed 6 years ago
go版本:go version go1.11.1 darwin/amd64 go env: GOARCH="amd64" GOBIN="" GOCACHE="/Users/popeye/Library/Caches/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/popeye/go" GOPROXY="" GORACE="" GOROOT="/usr/local/Cellar/go/1.11.1/libexec" GOTMPDIR="" GOTOOLDIR="/usr/local/Cellar/go/1.11.1/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" 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=/var/folders/92/f7tk0g155dd3_dgx542w8m9c0000gn/T/go-build351574784=/tmp/go-build -gno-record-gcc-switches -fno-common"
以下是错误信息: gomobile: /Users/popeye/go/bin/gobind -lang=go,objc -outdir=/var/folders/92/f7tk0g155dd3_dgx542w8m9c0000gn/T/gomobile-work-559861858 -tags=ios github.com/v2ray/v2ray-core failed: exit status 1 type-checking package "github.com/v2ray/v2ray-core" failed (/Users/popeye/go/src/github.com/v2ray/v2ray-core/config.go:8:2: could not import v2ray.com/core/common (cannot find package "v2ray.com/core/common" in any of: /usr/local/Cellar/go/1.11.1/libexec/src/v2ray.com/core/common (from $GOROOT) /Users/popeye/go/src/v2ray.com/core/common (from $GOPATH)))
用以下命令下载v2ray源代码:
go get -u v2ray.com/core/... go get -u v2ray.com/ext/...
go版本:go version go1.11.1 darwin/amd64 go env: GOARCH="amd64" GOBIN="" GOCACHE="/Users/popeye/Library/Caches/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/popeye/go" GOPROXY="" GORACE="" GOROOT="/usr/local/Cellar/go/1.11.1/libexec" GOTMPDIR="" GOTOOLDIR="/usr/local/Cellar/go/1.11.1/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" 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=/var/folders/92/f7tk0g155dd3_dgx542w8m9c0000gn/T/go-build351574784=/tmp/go-build -gno-record-gcc-switches -fno-common"
以下是错误信息: gomobile: /Users/popeye/go/bin/gobind -lang=go,objc -outdir=/var/folders/92/f7tk0g155dd3_dgx542w8m9c0000gn/T/gomobile-work-559861858 -tags=ios github.com/v2ray/v2ray-core failed: exit status 1 type-checking package "github.com/v2ray/v2ray-core" failed (/Users/popeye/go/src/github.com/v2ray/v2ray-core/config.go:8:2: could not import v2ray.com/core/common (cannot find package "v2ray.com/core/common" in any of: /usr/local/Cellar/go/1.11.1/libexec/src/v2ray.com/core/common (from $GOROOT) /Users/popeye/go/src/v2ray.com/core/common (from $GOPATH)))