我有错误:go install: no install location for directory /Users/xwilly/Dropbox/go/project/src outside GOPATH 我在 OS X 上使用 go 1.1 版。我可以构建和运行,但不能安装包。我的环境:GOPATH=/Users/xwilly/Dropbox/go/projectPATH=/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/go/bin:/Users/xwilly/Dropbox/go/project/bin项目树:/Users/xwilly/Dropbox/go/projectbinpkgsrc我可以无误地构建:..:src xwilly$ go build test.go ..:src xwilly$ go install test.gogo install: no install location for directory /Users/xwilly/Dropbox/go/project/src outside GOPATH这是一个简单的例子:xwilly$ cat test.go package mainimport ( "fmt")func main() { fmt.Println("Bonjour")}xwilly$ go run test.go Bonjourxwilly$ go install test.go go install: no install location for directory /Users/xwilly/Dropbox/go/project/src/learning outside GOPATH
1 回答
- 1 回答
- 0 关注
- 222 浏览
添加回答
举报
0/150
提交
取消