在mac OS Sierra 10.12上安装gomobile

时间:2017-12-24 16:54:09

标签: go gomobile

我正在尝试在mac OS Sierra 10.12上安装gomobile。我已经安装了1.7.1版本。

完成以下步骤后:

  1. go get golang.org/x/mobile/cmd/gomobile

  2. gomobile init

  3. 我收到以下错误

    gomobile: go install -pkgdir=/usr/local/mobgo/pkg/gomobile/pkg_darwin_arm std failed: exit status 2
    # internal/poll
    ../go/src/internal/poll/fd_mutex.go:194:6: missing function body
    ../go/src/internal/poll/fd_mutex.go:195:6: missing function body
    ../go/src/internal/poll/fd_poll_runtime.go:17:6: missing function body
    ../go/src/internal/poll/fd_poll_runtime.go:19:6: missing function body
    ../go/src/internal/poll/fd_poll_runtime.go:20:6: missing function body
    ../go/src/internal/poll/fd_poll_runtime.go:21:6: missing function body
    ../go/src/internal/poll/fd_poll_runtime.go:22:6: missing function body
    ../go/src/internal/poll/fd_poll_runtime.go:23:6: missing function body
    ../go/src/internal/poll/fd_poll_runtime.go:24:6: missing function body
    ../go/src/internal/poll/fd_poll_runtime.go:25:6: missing function body
    ../go/src/internal/poll/fd_poll_runtime.go:25:6: too many errors
    

1 个答案:

答案 0 :(得分:0)

我通过将go版本升级到1.9.2来修复它。 OS sierra似乎至少要求1.7.4或更高。 -