Go Installation: Difference between revisions
Jump to navigation
Jump to search
(→Mac) |
(→Linux) |
||
Line 9: | Line 9: | ||
==Linux== | ==Linux== | ||
<font color=darkkhaki> | |||
https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz | |||
Install under <tt>/opt</tt>: | |||
</font> | |||
<syntaxhighlight lang='bash'> | |||
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 | |||
</syntaxhighlight> | |||
<font color=darkkhaki> | |||
Then update <code>.bashrc</code>, declare <code>[[Go_Concepts_-_Runtime#GOROOT|GOROOT]]</code> environment variable: | |||
</font> | |||
<syntaxhighlight lang='bash'> | |||
export GOROOT=/opt/go | |||
export PATH=...:${GOROOT}/bin:... | |||
</syntaxhighlight> | |||
=Transfer from and Delete= | =Transfer from and Delete= | ||
{{Internal|Go Installation TO DELETE|Go Installation TO DELETE}} | {{Internal|Go Installation TO DELETE|Go Installation TO DELETE}} |
Revision as of 23:59, 14 August 2023
Internal
Installation
Mac
https://go.dev → Download → Apple macOS (ARM64) or Apple macOS (x86-64) → .pkg
→ double-click.
It installs
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:...