-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Can't install swag #209
Comments
@jdiedrick Looks like you have older github.com/ghodss/yaml version at local, please add the |
@jasonhancock please reopen it if you have any questions. |
Followed the recommendation and still "zsh: command not found: swag" |
I have installed swag as follows: go get -u github.com/swaggo/swag/cmd/swag. But when I run "swag", I got error like: -bash: swag: command not found. how can I resolved this issue? thanks. |
@stiffer-cl the binary will likely have been installed to $GOPATH/bin/swag. Run if from there or copy the file from there to somplace in your $PATH |
Thanks, I was able to resolve the issue by using the full path to the swag code base as you recommended.
From: Jason Hancock <notifications@github.com>
Reply-To: swaggo/swag <reply@reply.github.com>
Date: Wednesday, February 13, 2019 at 12:08 PM
To: swaggo/swag <swag@noreply.github.com>
Cc: Michael Roof <michael@myhomegenius.com>, Comment <comment@noreply.github.com>
Subject: Re: [swaggo/swag] Can't install swag (#209)
@stiffer-cl<https://github.com/stiffer-cl> the binary will likely have been installed to $GOPATH/bin/swag. Run if from there or copy the file from there to somplace in your $PATH
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#209 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Aq1XvxG21Do0mFrJf6Q4_OAQQRJIFtd2ks5vNFR_gaJpZM4WuMZl>.
|
Path variable must be set: Make sure you have that PATH in e.g. export PATH=$PATH:$HOME/go/bin |
Hi @pnutmath @jasonhancock I did the following
I am new to Golang. Can you please help? |
@hariraogotit from the directory with your main.go, run |
thank you very much that worked |
@jasonhancock, please use |
What and where is |
|
In my case, I added these two lines to my environment variable(MacOS):
Open a new terminal, then execute the Swaggo command. |
Currently, am using swag version 1.8.1 But the company am working for require me to use version 1.7.6 and have been trying to do this by google on how to do this BUT i was unable to get answer, can anybody help me on this? |
solved. |
@jasonhancock |
use this command please: |
works for me. thx ❤️ |
yes it works |
works for me. thx ❤️ |
Worked for me , thanks. |
Works thanks!! |
Bingo this is working - |
I searched for the same issue and came in. I started tracking down the cause myself. The conclusion is that the build failed because the go.mod, go.sum file did not have the right to update. The fundamental solution is to change the permissions of some files in Makefile to 755, or adjust the permissions as follows.
My environment is as follows.
Go Preferences are as follows.
The solution is as follows. cd /Users/minias/go/pkg/mod/github.com/swaggo/swag@v1.16.1
chmod 755 go.mod
chmod 755 go.sum
make build && make install
ls -al ~/go/bin/swag
-rwxr-xr-x@ 1 minias staff 14M 8 11 11:22 /Users/minias/go/bin/swag |
sechansydt@sechansydt:~/coding/go/src/test_swag$ go install github.com/swaggo/swag/cmd/swag@latest crypto/subtle internal/bytealg internal/chacha8rand sechansydt@sechansydt:~/coding/go/src/test_swag$ How to fix it? i always tried and always get error like this |
Describe the bug
I'm unable to install swag given the instructions on the README
To Reproduce
Steps to reproduce the behavior:
go get github.com/swaggo/swag/cmd/swag
on the command lineswag
Expected behavior
swag
should be installed properly on my machine.Desktop (please complete the following information):
@pei0804
The text was updated successfully, but these errors were encountered: