Installing Go 1.18beta2

Go 1.18beta2 may be installed a number of ways:

  • On a clean system: install Go 1.18beta2 on a system without Go
  • Using Go: or use an earlier version of Go to install Go 1.18beta2

On a clean system

  1. Download the appropriate file from the Go download page under the section #go1.18beta2.

  2. Follow the normal instructions, subsituting the above file for the one from the instructions.

Using Go

If the system already has a recent version of Go installed, Go 1.18beta2 may be installed with the following commands:

  1. Download the Go 1.18beta2 installer:

    1. go install golang.org/dl/go1.18beta2@latest
  2. Depending on how your system is configured, the installer was downloaded to three possible locations. The following command will ensure the path to the installer is part of the shell’s path:

    1. { [ -d "${GOBIN}" ] && _D="${GOBIN}"; } || \
    2. { [ -d "${GOPATH}" ] && [ -d "${GOPATH}/bin" ] && _D="${GOPATH}/bin"; } || \
    3. _D="${HOME}/go/bin" && _F="${_D}/go1.18beta2" && \
    4. { [ -f "${_F}" ] && export PATH="${_D}:${PATH}"; } ||
    5. echo "Could not locate go1.18beta2 program" 1>&2
  3. Run the following command to install Go 1.18beta2:

    1. go1.18beta2 download
  4. Verify go1.18beta2 is available:

    1. $ go1.18beta2 version
    2. go version go1.18beta2 linux/amd64

Next: Installing delve