您好,登录后才能下订单哦!
本人也是今天正式开始步入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进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。