栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Go语言

Golang1.71.3下载以及安装(Linux Mac Windows)

Go语言 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Golang1.71.3下载以及安装(Linux Mac Windows)

  • 一、前言
  • 二、下载
  • 三、安装
    • 1、Linux
    • 2、Mac
    • 3、Windows

一、前言

原文地址 GO Download and install

  • 用 百度翻译 翻译的,凑合着看吧。
二、下载
  • 【Linux下载】链接:https://pan.baidu.com/s/1vo8umsAix99Jc9eGQE2MJQ 提取码:f870
  • 【Mac下载】链接:https://pan.baidu.com/s/1kIxyWcPiUXZ-8PiipulnkA 提取码:poez
  • 【Windows下载】链接:https://pan.baidu.com/s/1ECJmIvpEHnV4tf3Zvwle7Q 提取码:f71v
  • 【三个一起下载】 链接:https://pan.baidu.com/s/1S9gRpGnED5Td9GEif69_eQ 提取码:f76o
三、安装 1、Linux

1、Extract the archive you downloaded into /usr/local, creating a Go tree in /usr/local/go. 解压缩下载到/usr/local中的归档文件,在/usr/local/Go中创建一个Go树。

  • Important: This step will remove a previous installation at /usr/local/go, if any, prior to extracting. Please back up any data before proceeding. 重要提示:此步骤将在提取之前删除位于/usr/local/go(如果有)的先前安装。请在继续之前备份所有数据。
  • For example, run the following as root or through sudo: 例如,以root用户身份或通过sudo运行以下命令:
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.17.3.linux-amd64.tar.gz

2、Add /usr/local/go/bin to the PATH environment variable. 将/usr/local/go/bin添加到PATH环境变量中。

  • You can do this by adding the following line to your $HOME/.profile or /etc/profile (for a system-wide installation): 您可以通过将以下行添加到$HOME/.profile或/etc/profile(用于系统范围的安装)来完成此操作:
export PATH=$PATH:/usr/local/go/bin
  • Note: Changes made to a profile file may not apply until the next time you log into your computer. To apply the changes immediately, just run the shell commands directly or execute them from the profile using a command such as source $HOME/.profile. 注意:在下次登录计算机之前,对配置文件所做的更改可能不适用。要立即应用更改,只需直接运行shell命令或使用诸如source$HOME/.profile之类的命令从概要文件执行它们。

3、 Verify that you’ve installed Go by opening a command prompt and typing the following command: 打开命令提示符并键入以下命令,验证是否已安装Go:

$ go version

4、Confirm that the command prints the installed version of Go. 确认该命令打印已安装的Go版本。

2、Mac

1、 Open the package file you downloaded and follow the prompts to install Go. 打开下载的软件包文件,按照提示安装Go。

  • The package installs the Go distribution to /usr/local/go. The package should put the /usr/local/go/bin directory in your PATH environment variable. You may need to restart any open Terminal sessions for the change to take effect. 该软件包将Go发行版安装到/usr/local/Go。包应该将/usr/local/go/bin目录放在PATH环境变量中。要使更改生效,您可能需要重新启动任何打开的终端会话。

2、 Verify that you’ve installed Go by opening a command prompt and typing the following command: 打开命令提示符并键入以下命令,验证是否已安装Go:

$ go version

3、Confirm that the command prints the installed version of Go. 确认该命令打印已安装的Go版本。

3、Windows

1、 Open the MSI file you downloaded and follow the prompts to install Go. 打开下载的MSI文件并按照提示安装Go。

  • By default, the installer will install Go to Program Files or Program Files (x86). You can change the location as needed. After installing, you will need to close and reopen any open command prompts so that changes to the environment made by the installer are reflected at the command prompt. 默认情况下,安装程序将安装Go-to程序文件或程序文件(x86)。您可以根据需要更改位置。安装后,需要关闭并重新打开所有打开的命令提示,以便安装程序对环境所做的更改反映在命令提示中。

2、 Verify that you’ve installed Go. 验证是否已安装Go。

  • 1)、In Windows, click the Start menu. 在Windows中,单击“开始”菜单。
  • 2)、In the menu’s search box, type cmd, then press the Enter key. 在菜单的搜索框中,键入cmd,然后按Enter键。
  • 3)、In the Command Prompt window that appears, type the following command: 在出现的命令提示窗口中,键入以下命令:
$ go version
  • 4)、Confirm that the command prints the installed version of Go. 确认该命令打印已安装的Go版本。
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/990130.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号