Under Mac installation golang

Preface: more and more people began to take the road golang of learning, including some technical colleagues around me to their "charge" of new technologies, better work in the future survival and development.

Personal use Mac environment, following a brief about the installation process:

First, the preparatory work

Official website to download the installation package:

Note: The latest stable version is v1.9

Development Kit installed version and is divided into condensed version. Mac and Windows version installed is unique, similar to their names:

go1.9.darwin-amd64.pkg

go1.9.windows-386.msi

go1.9.windows-amd64.msi

Install version, a little fool installation, the default context path are good, the operation is relatively easy.

Compact is a compressed file, you can unpack the contents inside, similar to their names:

go1.9.darwin-amd64.tar.gz

go1.9.linux-386.tar.gz

go1.9.linux-amd64.tar.gz

Download Go official language is  https://golang.org/dl/  can choose to open the download version, or use a mirror site  http://mirrors.flysnow.org/  , open search or find Golang, select the appropriate version Download this mirror site gets updated official version, basically the latest version, you can rest assured that use.

Second, the installation

Installation 1: I'm here to / usr / local / go / example. When configuring the environment variables for all users and Linux are the same, are / etc / profile of this document;

For the current user, a Mac is $ HOME / .bash_profile, other configurations are the same, including editing sudo permissions and effective after

Note: The default installation version to / usr / local / go

Installation 2: Direct mounting method


 

Proceed


 

 


 

 

Third, complete

Terminal performs the following effects;

 


 

Attachment: The tool need not download or directly I Baidu cloud link, there is also a variety of environments installation tool

Link: https: //pan.baidu.com/s/10d9TxTaORoZIUgVwv6AObQ

 Password: ys5w

The effect is as:

 


 

 

Guess you like

Origin www.cnblogs.com/weihui-vip/p/11902150.html