Skip to content

install: GOPATH/bin not added to PATH on install #30268

@milesmatthias

Description

@milesmatthias

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

$ go version
go version go1.11.5 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
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/mmatthias/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/mmatthias/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/yp/hpn6fn356nzfqkk0l319033c00kx44/T/go-build874912687=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

  1. Download & installed Mac package from https://golang.org/dl/
  2. go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb
  3. jb

What did you expect to see?

The help output for the jb command

What did you see instead?

bash: jb: command not found

Solution

I got this to work by adding ~/go/bin to my $PATH.

Either the Mac installer should do this automatically, or there needs to be an update to the documentation https://golang.org/doc/install to note that to be able to install and run third-party go binaries, you'll need to add this directory to your $PATH.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions