This page shows you how to install newtmgr from source code.
Install Go (golang)
If you have not already done so, install Go for your platform.
The easiest way on a MAC is to use
brew install go ==> Downloading https://homebrew.bintray.com/bottles/go-1.5.3.mavericks.bottle.t ... ==> Summary 🍺 /usr/local/Cellar/go/1.5.3: 5,336 files, 259.6M
Alternatively, you can download binaries from the golang.org site To test your Go implementation, you can query Go for its version information
$ go version go version go1.5.3 darwin/amd64
To use go, you must set a
$GOPATH variable in your environment. This tells
go where to put all the packages it downloads, builds and runs.
$ mkdir $HOME/dev $ export GOPATH=$HOME/dev/Go
Its best to add this to your
.profile so its set automatically for your
Download the newtmgr source
You will first download the source code for newt.
go get mynewt.apache.org/newt/... (wait a few minutes please, this sits without any indications of working)
Change into the directory where the newmgr tool was downloaded and install the newtmgr tool
cd $GOPATH/src/mynewt.apache.org/newt/newtmgr go install $ ls $GOPATH/bin ... newtmgr ...
Note: If the
go install command results in errors indicating some package
cannot be found, do a
go get to download all the third-party files needed
from github.com and then run
go install again.
Add to your Path
$GOPATH/bin directory to your path.