我想从源代码构建go程序。它需要github的一些包,如下所示。
➜ MEOW git:(master) ✗ go build
log.go:13:2: cannot find package "github.com/cyfdecyf/color" in any of:
/usr/share/go-1.6/src/github.com/cyfdecyf/color (from $GOROOT)
/home/user/gopath/src/github.com/cyfdecyf/color (from $GOPATH)
../../gopath/src/github.com/shadowsocks/shadowsocks-go/shadowsocks/encrypt.go:16:2: cannot find package "golang.org/x/crypto/blowfish" in any of:
/usr/share/go-1.6/src/golang.org/x/crypto/blowfish (from $GOROOT)
/home/user/gopath/src/golang.org/x/crypto/blowfish (from $GOPATH)
../../gopath/src/github.com/shadowsocks/shadowsocks-go/shadowsocks/encrypt.go:17:2: cannot find package "golang.org/x/crypto/cast5" in any of:
/usr/share/go-1.6/src/golang.org/x/crypto/cast5 (from $GOROOT)
/home/user/gopath/src/golang.org/x/crypto/cast5 (from $GOPATH)
../../gopath/src/github.com/shadowsocks/shadowsocks-go/shadowsocks/encrypt.go:18:2: cannot find package "golang.org/x/crypto/salsa20/salsa" in any of:
/usr/share/go-1.6/src/golang.org/x/crypto/salsa20/salsa (from $GOROOT)
/home/user/gopath/src/golang.org/x/crypto/salsa20/salsa (from $GOPATH)
我跑go get
。但是得到no such tool "compile"
错误。
➜ MEOW git:(master) ✗ go get github.com/cyfdecyf/color
go tool: no such tool "compile"
我的系统是ubuntu 16.然后我从包中安装golang。
➜ MEOW git:(master) ✗ go env
GOARCH="amd64"
GOBIN="/usr/share/go-1.6/bin"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/user/gopath"
GORACE=""
GOROOT="/usr/share/go-1.6"
GOTOOLDIR="/usr/share/go-1.6/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
我该怎么做才能去打包?