Go: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
apt-get install -y golang-1.23-go | apt-get install -y golang-1.23-go | ||
EXE | EXE | ||
cat << EXE | sudo bash | |||
update-alternatives --install /usr/local/bin/go go /usr/lib/go-1.23/bin/go 1983 | |||
update-alternatives --install /usr/local/bin/gofmt gofmt /usr/lib/go-1.23/bin/gofmt 1983 | |||
EXE | |||
export GOPATH=/usr/lib/go-1.23 | |||
export PATH=$PATH:$GOPATH/bin | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 12: | Line 20: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
sudo apt purge -y golang-go | sudo apt purge -y golang-go | ||
apt info golang-1.23-go | |||
apt search golang-go | apt search golang-go | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 10:54, 25 November 2024
cat << EXE | sudo bash
apt-get update;echo
apt list -a --upgradable
apt-get install -y golang-1.23-go
EXE
cat << EXE | sudo bash
update-alternatives --install /usr/local/bin/go go /usr/lib/go-1.23/bin/go 1983
update-alternatives --install /usr/local/bin/gofmt gofmt /usr/lib/go-1.23/bin/gofmt 1983
EXE
export GOPATH=/usr/lib/go-1.23
export PATH=$PATH:$GOPATH/bin
Playground
sudo apt purge -y golang-go
apt info golang-1.23-go
apt search golang-go
|
||||
| ||||
References
| ||