wiki:tipps_und_tricks:go_environment

Wie wird die Runtimeumgebung von GO installiert. Wie ist GOROOT, GOPATH zu setzen

GO Environment

zuerst sollte man go env aufrufen.
Wenn man hier nichts sieht, ist go nicht installiert. ⇒ ( [ yum|aptitude ] install golang )
Wenn man etwas sieht, ist go installiert und offenbart seine Environment-Variablen und deren Werte.

If you see empty for GOROOT:

  run `which go` (On my computer : /usr/local/go/bin/go)
  then export like this export GOROOT=/usr/local/go

If you see empty for GOPATH:

  Create any directory anywhere on your computer for go projects in my case: ~/GO_PROJECTS
  then export GOPATH = ~/GO_PROJECTS
Geben Sie Ihren Kommentar ein. Wiki-Syntax ist zugelassen:
   ___    ____   ___    __  ___   ___ 
  / _ \  / __/  / _ |  /  |/  /  / _ )
 / // / _\ \   / __ | / /|_/ /  / _  |
/____/ /___/  /_/ |_|/_/  /_/  /____/
 
  • wiki/tipps_und_tricks/go_environment.txt
  • Zuletzt geändert: 2017/12/28 11:02
  • von wikiadmin