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: install instructions don't mention adding $GOPATH/bin to $PATH #44930

Open
jeffory-orrok opened this issue Mar 11, 2021 · 3 comments
Open
Labels
Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@jeffory-orrok
Copy link

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

$ go version
go version go1.16.1 darwin/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN="/Users/jeff/go/bin"
GOCACHE="/Users/jeff/Library/Caches/go-build"
GOENV="/Users/jeff/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/jeff/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/jeff/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.16.1"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/jeff/Work/gRPC/gnostic/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/_p/4kmts9xd24zgd44d5rvthtt80000gn/T/go-build1011815535=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

install protoc manually following the directions
install go from the .pkg file following the directions on https://golang.org/doc/install
cd ~/Work/gRPC
git clone https://github.com/google/gnostic.git
cd gnostic
make

What did you expect to see?

I expected a successful build of gnostic

What did you see instead?

several instances of the following lines

go generate ./...
protoc-gen-go: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--go_out: protoc-gen-go: Plugin failed with status code 1.

This is because ONLY /usr/local/go/bin was added to paths.d and $HOME/go/bin was NOT added anywhere, and your website installation instructions don't say anything about checking the latter.

@gopherbot gopherbot added this to the Unreleased milestone Mar 11, 2021
@smasher164 smasher164 changed the title x/website: doc: install instructions don't mention adding $GOPATH/bin to $PATH Mar 11, 2021
@smasher164
Copy link
Member

Marking this as documentation since this information could be more discoverable, but https://golang.org/doc/code has a section on the location of installed binaries. Additionally, the official Go protobuf documentation mention the default path to which protoc-gen-go is installed.

@smasher164 smasher164 added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Mar 11, 2021
@roulpriya
Copy link

export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
export GOPATH=/home/priyambada/golib
export PATH=$PATH:$GOPATH/bin

This eventually works for me, must be added in docs
If you installed GoLang in a custom directory other than the default (/usr/local/), you must specify that directory as the value of the GOROOT variable.

@Battlesheepu
Copy link

Battlesheepu commented Mar 2, 2024

Since #66043 was closed as a duplicate, I'd like to bump this issue up.

It's been almost 2.5 years since the this issue's been created - is there any chance of adding instructions about including $GOBIN either to the installation docs or to the output of go help install?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants