Go Installation: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Internal=
=Internal=
* [[Go Engineering#Subjects|Go Engineering]]
* [[Go Operations]]
 
=Installation=
=Installation=
==Mac==
==Mac==
Line 6: Line 7:
https://go.dev → Download → Apple macOS (ARM64) or Apple macOS (x86-64) → <code>.pkg</code> → double-click.
https://go.dev → Download → Apple macOS (ARM64) or Apple macOS (x86-64) → <code>.pkg</code> → double-click.


It installs
It installs in <code>usr/local/go</code>.


==Linux==
==Linux==
Line 24: Line 25:


<font color=darkkhaki>
<font color=darkkhaki>
Then update <code>.bashrc</code>, declare <code>[[Go_Concepts_-_Runtime#GOROOT|GOROOT]]</code> environment variable:
Then update <code>.bashrc</code>, declare <code>[[Go_Environment_Variables#GOROOT|GOROOT]]</code> environment variable:
</font>
</font>
<syntaxhighlight lang='bash'>
<syntaxhighlight lang='bash'>
Line 31: Line 32:
</syntaxhighlight>
</syntaxhighlight>


=Transfer from and Delete=
=Post-Installation=
{{Internal|Go Installation TO DELETE|Go Installation TO DELETE}}
<font color=darkkhaki>
Set <code>[[Go Development and Execution Environment#GOPATH|GOPATH]]</code> to match your local environment.
</font>

Latest revision as of 01:48, 8 September 2023

Internal

Installation

Mac

https://go.dev → Download → Apple macOS (ARM64) or Apple macOS (x86-64) → .pkg → double-click.

It installs in usr/local/go.

Linux

https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz

Install under /opt:

cd /opt
wget https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz
gunzip < go1.6.linux-amd64.tar.gz | tar xfv -
mv go go1.6
ln -s ./go1.6 go

Then update .bashrc, declare GOROOT environment variable:

export GOROOT=/opt/go
export PATH=...:${GOROOT}/bin:...

Post-Installation

Set GOPATH to match your local environment.