Skip to content

Instantly share code, notes, and snippets.

@CagriAldemir
Created October 26, 2022 07:38
Show Gist options
  • Save CagriAldemir/6c62ecb157226a0d4fa6cd6beae09fc8 to your computer and use it in GitHub Desktop.
Save CagriAldemir/6c62ecb157226a0d4fa6cd6beae09fc8 to your computer and use it in GitHub Desktop.
GO Installation with GVM

GO Installation with GVM

For the reason here, you should follow the steps below before installing the first GO version with GVM;

  • Download latest GO version as archive from here.
  • Extract archive.
  • Execute this command in terminal to add GO path temporarily; export PATH="$PATH:/Users/cagrialdemir/Desktop/go/bin"
  • Install latest GO version with GVM; gvm install go1.19.2
  • Use downloaded GO and set it as default; gvm use go1.19.2 --default
  • Now, you can delete temporarily downloaded GO folder; rm -rf /Users/cagrialdemir/Desktop/go

If you want to install non-ARM GO versions with M1 processor;

  • Download the wanted GO version as archive.
  • Extract into ~/.gvm/gos/ and rename extracted folder as go<version-number>
  • Create a file in ~/.gvm/environments/ and just copy the file for a different version and change the version numbers in the file.
  • Create an empty directory named go<version-number> in the ~/.gvm/pkgsets/ path.
  • Now, you can use the version with gvm use go<version-number>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment