Install go compilation environment in Ubuntu
Good memory is not as bad as writing, so the Golang compilation environment to record the installation process.
First download some dependent packages:
sudo Install gawk GCC Make
Then install mercurial. Mercurial is a version management system that Golang uses to manage versions.
sudo Install python-setuptoolssudoinstall python-devsudo Install build-essentialsudoinstall Mercurial
After the installation is complete, start the clone Golang source code.
HG Clone-r release https://go.googlecode.com/hg/go
This step depends on the specific speed, it may be slower. So don't be a bit impatient ...
When we see clone complete, we begin to modify the environment variables.
# gosrc,godist is the directory I created. Need to modify export goroot= $HOME/gosrc/goexport GOOS=linuxexport PATH=${path}: $HOME/gosrc/go/ binexport Gopath= $HOME/godist/bin
Ready to start compiling.
CD $GOROOT/src. /all.bash
This step will be over in a moment. Then execute go if the usage occurs, it means success!
Install go compilation environment in Ubuntu