Linux安装go语言

1、去官网 https://go.dev/dl 下载linux系统的安装包,上传到服务器的/usr/local目录,执行下面的命令

tar -xzf go1.21.6.linux-amd64.tar.gz

注意go1.21.6换成自己下载的对于的版本号

2、添加环境变量

编辑/etc/profile

vi /etc/profile

在文件最下面添加下面代码,保存退出

export PATH=$PATH:/usr/local/go/bin

3、更新/etc/profile文件

source /etc/profile

4、查看go安装版本

go version
sanradar
sanradar
文章: 97

4 评论

  1. hey there and thank you for your information – I’ve certainly picked up anything new
    from right here. I did however expertise several technical points using this web site,
    since I experienced to reload the website a lot of times previous to I could get it
    to load properly. I had been wondering if your web hosting is OK?
    Not that I am complaining, but sluggish loading instances times will very frequently affect your placement in google and could damage
    your quality score if ads and marketing with Adwords.

    Anyway I am adding this RSS to my e-mail and can look out for a lot more of your respective
    exciting content. Make sure you update this again soon..
    Escape roomy lista

留下评论

您的电子邮箱地址不会被公开。 必填项已用 * 标注