Now I’ll create a new folder for my go projects and open it in vscode. Restart the terminal and verify the manual install with go version It’s a very common thing to do when installing any software manually. ![]() bashrc and this new line adds the golang location to the global PATH. If this line doesn’t make sense to you, it is basically adding a new line to the hidden file. sudo echo 'export PATH=$PATH:/usr/local/go/bin' > ~/.zshrc sudo echo 'export PATH=$PATH:/usr/local/go/bin' > ~/.bashrc So we tell the system about golang by adding it to the global PATH. As at this point the system does not know about golang, we know this because if we type go versionin a terminal we get. Now we have the go language and compiler in the correct location we just need to be able to access it through our terminal. cd /Downloads sudo tar -xvf go1.14.2.Īnd simply move the new go directory to the recommended location. Next, cdinto your download location, and extract the tarball (tar.gz) file. Note: I also don’t recommend installing through apt on Ubuntu, as it installs the package in weird location and on top of that, it won’t be the latest version. So first head to the website and download the latest version-> We will install it in the location recommended by the official golang docs, which is /usr/local/go ![]() sudo apt remove golang sudo apt autoremove If you think you may have previous version of golang install, or you’re not sure, run the following commands to completely remove of any trace of golang on your system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |