Installation golang, third-party libraries, Pit
1, to obtain the installation package
go Language Chinese network: https://studygolang.com/dl
Official website address: https://studygolang.com/dl
2. Download
Select the downloaded installation package, right Replication Service Pack Address: wget https://studygolang.com/dl/golang/go1.11.13.linux-amd64.tar.gz
3, extract (standardized in order to facilitate the management, to extract the / usr / local, go file is generated)
tar zxvf go1.11.linux-amd64.tar.gz -C /usr/local
4, set the environment variable and make takes effect globally
# Edit profile file # vi / etc / profile # at the end of file add the following #go Setting Export GOROOT = / usr / local / Go Export GOPATH = / usr / local / GOPATH
source /etc/profile
5, version verification and env
6, the implementation of the program, an error
7, the core
The entire project (program execution, as well as third-party libraries required) to be moved to the following gopath of src (src Why New? This is a third party libraries go read the specification)