togglcsv icon indicating copy to clipboard operation
togglcsv copied to clipboard

`make install` producing warning, can't find binary

Open Nick-OpusVL opened this issue 5 years ago • 2 comments

This may be showing up my ignorance of go package installation, but perhaps you can clarify.

If I do make install as user I see this:

nick.booker@dev-03:~/src/togglcsv [j:0 h:31864] 
$ make install
go run make.go -install
warning: "github.com/andreaskoch/togglcsv/..." matched no packages

I search my whole home directory and can't find it:

$ find ~ -name togglcsv 2>/dev/null
/home/nick.booker/src/togglcsv

I've had look inside make.go to see if I can make sense of what and where it's trying to install it. The comment at the top says it should end up in ./bin but I know how comments can go stale.

I've also tried doing it again after making the directory path held in const ProjectNamespace = "github.com/andreaskoch/togglcsv" in case it was a directory it was looking for of that name.

nick.booker@dev-03:~/src/togglcsv [j:0 h:31874] 
$ mkdir -p github.com/andreaskoch/togglcsv

nick.booker@dev-03:~/src/togglcsv [j:0 h:31875] 
$ make install
go run make.go -install
warning: "github.com/andreaskoch/togglcsv/..." matched no packages

nick.booker@dev-03:~/src/togglcsv [j:0 h:31878] 
$ find -name togglcsv
./github.com/andreaskoch/togglcsv

Perhaps some more detailed installation docs for us non-Go-natives would be a useful addition.

Nick-OpusVL avatar Jul 12 '19 10:07 Nick-OpusVL

$ go version
go version go1.7.4 linux/amd64

Nick-OpusVL avatar Jul 12 '19 11:07 Nick-OpusVL

Don't do that manually, rather use:

go install github.com/andreaskoch/togglcsv@latest

Then it installs the package in $GOPATH/src and the command togglcsv is available in $GOPATH/bin

To find the GOPATH you can use echo $(go env GOPATH)

kevinpolisano avatar Oct 27 '22 15:10 kevinpolisano