Closed spnzig closed 7 years ago
How do you have go installed? What version of go are you using? Typically you shouldn't have to use sudo
. I'm guessing you installed go as root, which is why you needed to use sudo
.
Go uses the GOPATH
environment variable to know where to install packages. I'm guessing since you installed with root, the gopath is something like /root/go
, but only for the root user.
When you go get
, it installs the binary at $GOPATH/bin
, so if that directory is not in your $PATH
, your shell would not be able to find the command.
The easier way to do this might be to use your (non-root) user account and:
echo "export GOPATH=$HOME/go" >> ~/.profile
echo "export PATH=$GOPATH/bin" >> ~/.profile
source ~/.profile
go get github.com/micahhausler/k8s-oidc-helper
I installed the k8s-oidc-helper package with go using
go get github.com/micahhausler/k8s-oidc-helper
and it gave me permission issues. But then i ran it with sudo and it worked. But when i try k8s-oidc-helper --version it gives command not found I am using a VM runningUbuntu 16.04LTS
for this.kubernetes version - v1.7.2