ondrajz / go-callvis

Visualize call graph of a Go program using Graphviz
https://ofabry.github.io/go-callvis
MIT License
5.82k stars 402 forks source link

command not found: go-callvis #135

Open manonmichel opened 1 year ago

manonmichel commented 1 year ago

I am struggling to understand how to use go-callvis.

I installed it as such:

git clone https://github.com/ofabry/go-callvis.git
cd go-callvis && make install

and then try to run the help command just to see if it works:

go-callvis -h

But I just get:

zsh: command not found: go-callvis

I am on MacOS 12.5 and have Go version 1.19.2.

Any idea what I could be missing?

six-double-seven commented 1 year ago

+1

LL-res commented 1 year ago

go get will install go-callvis at you home directory,for example at /home/xxx/go/bin,not the same directory with go binary file ,export that directory,that may work

vnhdev commented 1 year ago

could you describe it more clearly?

champkeh commented 1 year ago

+1

champkeh commented 1 year ago

image

my GOPATH/bin directory not find go-callvis program.

champkeh commented 1 year ago

image

my GOPATH/bin directory not find go-callvis program.

$ go version
go version go1.20 darwin/arm64
champkeh commented 1 year ago

I reinstalled again with make install and it worked.

Is there a problem with the installation method of go get in the Installation section of the guide?

LasseJacobs commented 1 year ago

Is your GOPATH/bin part of your $PATH?

You can check by running echo $PATH it should include something like: /Users/<yourname>/go/bin

If not you can add it using:

PATH="/Users/<yourname>/go/bin:$PATH" 

Best to add this to your bashrc file. (note that these file path are what you would see on mac, on Linux it will be slightly different).

JDChi commented 1 year ago

Maybe use go install github.com/ofabry/go-callvis@latest.

Vex7eX commented 1 year ago
git clone https://github.com/ofabry/go-callvis.git
cd go-callvis && make install

By the way, If you use go install github.com/ofabry/go-callvis@latest on your mac, you may encounter this problem #145