dtwd74916 2016-01-25 13:31
浏览 156

尝试安装BEEGO时出错

I am very new with GO, and when I tried to install the framwork beego on my Windows 8 Desktop or in a VirtualBox with Debian8 I had the same error:

sergi@odoo:~$ go get github.com/astaxie/beego
# github.com/astaxie/beego
work/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 newline
work/src/github.com/astaxie/beego/tree.go:157: non-declaration statement outside function body
work/src/github.com/astaxie/beego/tree.go:158: non-declaration statement outside function body
work/src/github.com/astaxie/beego/tree.go:159: non-declaration statement outside function body
work/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 }
  • 写回答

3条回答 默认 最新

  • doubei2231 2016-01-25 13:47
    关注

    The empty for range loops were introduced in Go 1.4. Your Go version seems to be older. Check your version with

    go version
    

    and if it's older than 1.4, install a newer version from the official website.

    评论

报告相同问题?