Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: setting GOROOT is not necessary when installing to custom location #25002

Closed
rhcarvalho opened this issue Apr 23, 2018 · 1 comment
Closed
Labels
Documentation FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@rhcarvalho
Copy link
Contributor

What version of Go are you using (go version)?

go version go1.10.1 darwin/amd64

Does this issue reproduce with the latest release?

Yes.

What did you do?

  1. Visit https://golang.org/dl/ and download a go1.10.1 tarball

  2. Install to a custom location:

    $ cd /tmp
    $ tar -xzf ~/Downloads/go1.10.1.darwin-amd64.tar.gz
    $ go/bin/go env GOROOT
    /tmp/go
    
  3. Visit https://golang.org/doc/install#tarball_non_standard and see the installation instructions

What did you expect to see?

No need to set GOROOT, as it is indeed not necessary in Go 1.10.

What did you see instead?

For example, if you installed Go to your home directory you should add commands like the following to $HOME/.profile:

export GOROOT=$HOME/go1.X
export PATH=$PATH:$GOROOT/bin

Note: GOROOT must be set only when installing to a custom location.


In #18678 (comment), @minux proposed to derive GOROOT from os.Executable...

And then we can eliminate all mentions of GOROOT in user facing documents (in fact, we should actively discourage setting GOROOT in user facing documents.)

The change was implemented in CL 42533, but the documentation was not updated to remove suggestions to set GOROOT.

@ianlancetaylor ianlancetaylor added this to the Go1.11 milestone Apr 24, 2018
@ianlancetaylor ianlancetaylor added help wanted NeedsFix The path to resolution is known, but the work has not been done. labels Apr 24, 2018
@gopherbot
Copy link

Change https://golang.org/cl/110435 mentions this issue: doc: remove GOROOT custom install instruction

@golang golang locked and limited conversation to collaborators Jun 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants