This is a creation in Article, where the information may have evolved or changed.
Install Golang from source (compile) two
"From the Source (compilation) installation Golang One"(http://www.cnblogs.com/majianguo/p/7258975.html) recorded from the official download Golang source code, on ubuntu build Golang The process of developing the environment. The compiled tool software lacks godoc, which requires a separate compilation of the installation, the following is mainly about the steps to compile Godoc ( operation on Raspberrypi + Raspbian).
Download the golang/tools source code (Https://github.com/golang/tools) from GitHub and place the source in the $GOPATH/src/golang.org/x/ Tools,
wget https://github.com/golang/tools/archive/master.zipcp Master. zip /home/pi/mygo/src/golang.org/x/unzip master. Zip MV tools-master Tools
Then open the command line, switch to the directory, execute gobuild, and move the compiled Godoc to the $GOROOT/bin
Pi@raspberrypi:~/go-go1. 9.2/bin $ cd/home/pi/mygo/src/golang.org/x/tools/cmd/godoc/pi@raspberrypi:~/mygo/src/ golang.org/x/tools/cmd/Godoc $ go buildpi@raspberrypi:mv godoc/home/pi/go-go1. 9.2 // bin/ Pi@raspberrypi:~/mygo/src/golang.org/x/tools/cmd/godoc $
Verifying the installation, performing godoc-http:8088 on the terminal
Pi@raspberrypi:~/go-go1. 9.2/bin $ godoc-http:8088
Open http://127.0.0.1:8088 in the browser