'Trouble with go get install for mcumgr

I am trying to install MCUMgr on MACos. Here is a link for mcumgr: https://docs.zephyrproject.org/latest/services/device_mgmt/mcumgr.html

I install the Go Programming Language and enter this command:

go install github.com/apache/mynewt-mcumgr-cli/mcumgr@latest

Upon doing this I get the following error:

go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:28:3: //go:linkname must refer to declared function or variable

I then googled and found the following from stackoverflow: Go 1.18 build error on Mac: "unix/syscall_darwin.1_13.go:25:3: //go:linkname must refer to declared function or variable"

This gives me the following error:

go: golang.org/x/sys: unrecognized import path "golang.org/x": parse https://golang.org/x?go-get=1: no go-import meta tags ()

I am stuck right now on how to install MCUMgr for MACos and wondering if someone has previously had the same issues?



Solution 1:[1]

I used go 1.17 instead and used:

go get github.com/apache/mynewt-mcumgr-cli/mcumgr

Then into the bin folder where it is installed use sudo ./mcumgr to run.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 cperez08