It’s not the first time that I’m installing a third party go packages via go get -u github.com/ ....
The problem is that after “installing” the program that the package is providing is not available.
For instance, the errcheck program. In my command-line, I run go get -u github.com/kisielk/errcheck and it’s done without a problem. But what then? How can I use the errcheck program in the command-line?
Another example is go-bindata.
I tried to find any script in the errcheck package that supposedly would be the program but there was nothing like that?
Executables are installed in the directory named by the GOBIN environment variable, which defaults to $GOPATH/bin or $HOME/go/bin if the GOPATH environment variable is not set.
Is your installation directory in your PATH environment variable?
env: ‘/home/aram/.nvm/versions/node/v13.3.0/bin:/home/aram/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/bin:/usr/local/go/bin:/home/aram/.fzf/bin:/usr/local/go/bin:/home/aram/.local/bin’: No such file or directory
I added export GOPATH="$HOME/go" PATH="$PATH:GOPATH/bin" to my ~/.zshrc.
Now my env $PATH looks like this: env: ‘/home/aram/.nvm/versions/node/v13.3.0/bin:/home/aram/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/bin:/usr/local/go/bin:/home/aram/.fzf/bin:/usr/local/go/bin:/home/aram/.local/bin:GOPATH/bin’: No such file or directory