我要评分
获取效率
正确性
完整性
易理解

Installing Go

To compile BoringSSL, the Go version must be 1.13 or later.

  1. Download and decompress the Go installation package.
    1
    2
    wget https://dl.google.com/go/go1.14.2.linux-arm64.tar.gz
    tar -zxf go1.14.2.linux-arm64.tar.gz
    
  2. Create an installation path and perform deployment.
    1
    2
    mkdir -p /opt/install
    mv go /opt/install
    
  3. Set environment variables.
    1. Open the /etc/profile file.
      1
      vi /etc/profile
      
    2. Press i to enter the insert mode and add the following content to the end of the file:
      1
      2
      export GO_HOME=/opt/install/go
      export PATH=$GO_HOME/bin:$PATH
      
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  4. Make the environment variables take effect.
    1
    source /etc/profile
    
  5. Check whether Go is successfully installed.
    1
    go version
    

    The installation is successful if information similar to the following is displayed: