Skip to content
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 run on MacOs #32

Open
Igorpollo opened this issue Mar 27, 2019 · 2 comments
Open

Can't run on MacOs #32

Igorpollo opened this issue Mar 27, 2019 · 2 comments

Comments

@Igorpollo
Copy link

I'm trying to run it on MacOs.
recieving this:

➜  / expvarmon -ports="8181"

zsh: command not found: expvarmon

thanks

@divan
Copy link
Owner

divan commented Mar 29, 2019

Hey @Igorpollo, when you run command from shell, it is normally looking for binary in specific folders, listed in PATH environment variable. If you install Go app via go install – like go install github.com/divan/expvarmon – it installs it into the folder $GOPATH/bin. So to be able to run it like that, you have to add your GOPATH/bin to that env variable PATH in your zsh setup:

export PATH=$GOPATH/bin:$PATH

Or, if you build app yourself in the sources directory, just run it from the current folder:

./expvarmon -ports="8181"

@keremgocen
Copy link

since GOPATH is not set automatically anymore with the install unless you've done it manually, what you need to make sure is your go binary folder is exported in the PATH (ie. you can do go env GOPATH to see where your go folder is and then export the /bin folder as shown above)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants