您好,登錄后才能下訂單哦!
本人也是今天正式開始步入Golang語言的學習,希望大家一起共同學習。
官網地址: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
編譯后會在項目文件夾下生成test可執行文件,并運行該文件
兩種方式任選其一:
好了到這里我們我安裝結束了。歡迎一起學習Golang ! ! !
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。