我对 GO 很陌生,当我尝试在我的 Windows 8 桌面或带有 Debian8 的 VirtualBox 上安装框架 beego 时,我遇到了同样的错误:sergi@odoo:~$ go get github.com/astaxie/beego# github.com/astaxie/beegowork/src/github.com/astaxie/beego/tree.go:144: syntax error: unexpected range, expecting {work/src/github.com/astaxie/beego/tree.go:155: syntax error: unexpected else, expecting semicolon or newlinework/src/github.com/astaxie/beego/tree.go:157: non-declaration statement outside function bodywork/src/github.com/astaxie/beego/tree.go:158: non-declaration statement outside function bodywork/src/github.com/astaxie/beego/tree.go:159: non-declaration statement outside function bodywork/src/github.com/astaxie/beego/tree.go:160: syntax error: unexpected }work/src/github.com/astaxie/beego/tree.go:257: syntax error: unexpected range, expecting {work/src/github.com/astaxie/beego/tree.go:267: syntax error: unexpected else, expecting semicolon or newline or }work/src/github.com/astaxie/beego/tree.go:283: syntax error: unexpected }
2 回答
元芳怎么了
TA贡献1798条经验 获得超7个赞
您似乎在使用旧的 Go 版本,该版本无法构建beego
包。
请注意,该软件包仅针对go 1.5.1
. 所以尝试升级去1.5.x
并尝试再次获取它。
https://github.com/astaxie/beego/blob/master/.travis.yml#L4
我很确定升级会解决您的问题。
- 2 回答
- 0 关注
- 225 浏览
添加回答
举报
0/150
提交
取消