-
Notifications
You must be signed in to change notification settings - Fork 313
gin: command not found #114
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
Comments
Have a look at this post: cannot-set-gopath-on-mac-osx All I needed to do was to make sure my GOPATH environment variable was set, then restart the terminal. |
I am having the same issue on mint 18.1 with go version go1.8.3 linux/amd64. The - gin -h 'gin: command not found'. When I run go env I see that my GOPATH is set to my workspace (GOPATH="/home/{user}/go"). This folder contains /src /bin /pkg folder's and I can see that gin is in the bin folder. When I run echo $PATH i see that GOPATH/bin (/go/bin) is in my PATH gin will run if I use ~/go/bin/gin |
Same as for @kylerdanielster. |
|
The above worked !! Thank you so much @WangShayne |
Don't copy files anywhere, you'll pollute your system with random files in random locations, instead ensure your system is properly configured. When you install Golang, you should perform two steps that unfortunately the installation does not take care of:
Linux, MacOS, etc. echo $GOPATH
echo $PATH | grep $GOPATH Windows echo %GOPATH%
echo %PATH% | find "%GOPATH%" |
Hello Guys, Fasttrack to 2022, I find myself is the same situation. I am using Macos monterey with go 1.19.1. I just used the gin install command as documented in a module supported project using ❯ echo $GOPATH
/Users/username/go
❯ echo $PATH | grep $GOPATH
/opt/homebrew/Cellar/go/1.19.1/libexec/bin:/Users/username/go/bin:/Users/username/.sdkman/candidates/springboot/cu..........
❯ ls -lh /Users/username/go
total 0
drwxr-xr-x 7 username staff 224B Sep 10 14:57 bin
drwxr-xr-x 4 username staff 128B Jul 5 07:32 pkg
I do not have the gin installed in the bin folder of the $GOPATH, instead it's in the pkg/mod. Not sure what to do from there ❯ ls -lh /Users/username/go/pkg/mod/github.com/codegangsta/
total 0
dr-xr-xr-x 8 username staff 256B Sep 18 11:12 [email protected]
dr-xr-xr-x 8 username staff 256B Sep 18 11:12 [email protected]
|
|
Thanks @lietu that is helpful |
Sadly this PR above wasn't merged. In README.md it still says to invoke |
For me even thought i hat |
Hi everybody,
after doing
go get github.com/codegangsta/gin
and doinggin -h
I getgin: command not found
. I'm doinggin -h
inside myGOPATH
. I'm running on 4.4.63-1-MANJARO.What's causing this?
The text was updated successfully, but these errors were encountered: