第三节 golang devops项 目实战 - 安装go开发环境 笔记本: golang 创建时间: 2019/5/26 22:00 更新时间: 2019/7/10 16:40 作者: 152fypmm665 URL: /p go语言支持二进制安装和源码安装两种方式,如果采用二进制包安装的方式请看你的操作系统和 CPU架构是不是以下表格所示,如果不满足只能通过源码安装,或者使用gccgo工具。 Operating system Architectures Notes FreeBSD 10.3 or later amd64, 386 Debian GNU/kFreeBSD not supported Linux 2.6.23 or later with amd64, 386, arm, arm64, CentOS/RHEL 5.x not supported. glibc s390x, ppc64le 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 amd64, 386 † or later use MinGW gcc . No need for cygwin or msys. 官方安装指导见:/doc/install Linux上安装 以下安装指导是以ubuntu 18.4系统为例,其余的Linux版本,unix,macOS,FreeBSD基本一 样。 二进制安装方法 先查看系统信息 root@lee:~/sw# uname -a Linux lee 5.0.0-1007-gcp #7-Ubuntu SMP Fri May 24 06:21:10 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux 如上所示是X86 64位的系统,到 /dl/下载 go1.12.7.linux-amd64.tar.gz。 第一步:下载go1.12.6.linux-amd64.tar.gz root@ubuntu:~/sw# wget /go/go1.12.7.linux-amd64.tar.gz --2019-07-09 02:14:08-- /go/go1.12.7.linux-arm64.tar.gz Resolving ()... 00, 9, 7, ... Connecting to ()|00|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 104288170 (99M) [application/octet-stream] Saving to: ‘go1.12.7.linux-arm64.tar.gz’ go1.12.7.linux-arm64.tar.gz 100% [===========================================================================================>] 99.46M 9.25MB/s in 9.8s 2019-07-09 02:14:18 (10.1 MB/s) - ‘go1.12.