您好,登錄后才能下訂單哦!
本人也是今天正式開始步入Golang語言的學(xué)習(xí),希望大家一起共同學(xué)習(xí)。
官網(wǎng)地址:https://studygolang.com/dl
Operating system | Architectures | Notes |
---|---|---|
FreeBSD 10.3 or later | amd64, 386 | Debian GNU/kFreeBSD not supported |
Linux 2.6.23 or later with glibc | amd64, 386, arm, arm64, s390x, ppc64le | CentOS/RHEL 5.x not supported. Install from source for other libc. |
macOS 10.10 or later | amd64 | use the clang or gcc? that comes with Xcode? for cgo support |
Windows 7, Server 2008R2 or later | amd64, 386 | use MinGW gcc?. No need for cygwin or msys. |
[root@devlop package]# wget https://studygolang.com/dl/golang/go1.12.7.linux-amd64.tar.gz
[root@devlop package]# tar -zxvf go1.12.7.linux-amd64.tar.gz -C /usr/local/
[root@devlop package]# cd /usr/local/go/
[root@devlop go]# ls
api AUTHORS bin CONTRIBUTING.md CONTRIBUTORS doc favicon.ico lib LICENSE misc PATENTS pkg README.md robots.txt src test VERSION
[root@devlop go]# vim /etc/profile <!--在最后添加一行-->
export PATH=$PATH:/usr/local/go/bin
[root@devlop go]# source /etc/profile
[root@devlop ~]# go version
go version go1.12.7 linux/amd64
[root@devlop ~]# mkdir test
[root@devlop ~]# vim test/test.go
package main
import "fmt"
func main() {
fmt.Println("Welcome Golang")
}
[root@devlop ~]# cd test/
[root@devlop test]# go build test.go
編譯后會(huì)在項(xiàng)目文件夾下生成test可執(zhí)行文件,并運(yùn)行該文件
兩種方式任選其一:
好了到這里我們我安裝結(jié)束了。歡迎一起學(xué)習(xí)Golang ! ! !
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。