command not found
krishnakdkce opened this issue · comments
krishnakdkce commented
after build all app
$ net.capture -iface eth0
command not found
Phil commented
How did you compile? The executables are not in your $PATH
krishnakdkce commented
go/src/github.com/dreadl0ck # GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -o netcap-linux -i github.com/dreadl0ck/netcap/cmd
can't load package: package github.com/dreadl0ck/netcap/cmd: no Go files in /go/src/github.com/dreadl0ck/netcap/cmd
krishnakdkce commented
but i am using ubuntu
Phil commented
Try this:
#!/bin/bash
# generated by ZEUS v_master
# Timestamp: [Mon Jun 17 15:27:30 2019]
VERSION="0.4.0"
go build -ldflags "-X github.com/dreadl0ck/netcap.Version=v${VERSION}" -o $(go env GOPATH)/bin/net.capture -i github.com/dreadl0ck/netcap/cmd/capture
go build -ldflags "-X github.com/dreadl0ck/netcap.Version=v${VERSION}" -o $(go env GOPATH)/bin/net.label -i github.com/dreadl0ck/netcap/cmd/label
go build -ldflags "-X github.com/dreadl0ck/netcap.Version=v${VERSION}" -o $(go env GOPATH)/bin/net.collect -i github.com/dreadl0ck/netcap/cmd/collect
go build -ldflags "-X github.com/dreadl0ck/netcap.Version=v${VERSION}" -o $(go env GOPATH)/bin/net.agent -i github.com/dreadl0ck/netcap/cmd/agent
go build -ldflags "-X github.com/dreadl0ck/netcap.Version=v${VERSION}" -o $(go env GOPATH)/bin/net.proxy -i github.com/dreadl0ck/netcap/cmd/proxy
go build -ldflags "-X github.com/dreadl0ck/netcap.Version=v${VERSION}" -o $(go env GOPATH)/bin/net.export -i github.com/dreadl0ck/netcap/cmd/export
go build -ldflags "-X github.com/dreadl0ck/netcap.Version=v${VERSION}" -o $(go env GOPATH)/bin/net.dump -i github.com/dreadl0ck/netcap/cmd/dump
go build -ldflags "-X github.com/dreadl0ck/netcap.Version=v${VERSION}" -o $(go env GOPATH)/bin/net.util -i github.com/dreadl0ck/netcap/cmd/util
echo done
Phil commented
The 0.4 release contains precompiled binaries for linux by the way: https://github.com/dreadl0ck/netcap/releases/tag/v0.4.0
krishnakdkce commented
thanks for quick reply,let me do that
krishnakdkce commented
thanks it wok well