Reading the directions on https://blog.simos.info/how-to-compile-lxd-p2c-to-migrate-physical-servers-to-lxd-containers/
I was not able to find the binaries. Also when trying to compile it failed. I have the following errors.
~/go/pkg/mod/github.com/lxc/lxd@v0.0.0-20210417150257-249e78e8ab1b# make lxd-p2c
CGO_ENABLED=0 go install -v -tags netgo ./lxd-p2c
lxd-p2c/transfer.go:12:2: cannot find package "github.com/gorilla/websocket" in any of:
/snap/go/7360/src/github.com/gorilla/websocket (from $GOROOT)
/root/go/src/github.com/gorilla/websocket (from $GOPATH)
lxd-p2c/utils.go:13:2: cannot find package "github.com/lxc/lxd/client" in any of:
/snap/go/7360/src/github.com/lxc/lxd/client (from $GOROOT)
/root/go/src/github.com/lxc/lxd/client (from $GOPATH)
lxd-p2c/main_migrate.go:16:2: cannot find package "github.com/lxc/lxd/lxc/utils" in any of:
/snap/go/7360/src/github.com/lxc/lxd/lxc/utils (from $GOROOT)
/root/go/src/github.com/lxc/lxd/lxc/utils (from $GOPATH)
lxd-p2c/transfer.go:15:2: cannot find package "github.com/lxc/lxd/lxd/migration" in any of:
/snap/go/7360/src/github.com/lxc/lxd/lxd/migration (from $GOROOT)
/root/go/src/github.com/lxc/lxd/lxd/migration (from $GOPATH)
lxd-p2c/transfer.go:16:2: cannot find package "github.com/lxc/lxd/lxd/rsync" in any of:
/snap/go/7360/src/github.com/lxc/lxd/lxd/rsync (from $GOROOT)
/root/go/src/github.com/lxc/lxd/lxd/rsync (from $GOPATH)
lxd-p2c/transfer.go:17:2: cannot find package "github.com/lxc/lxd/shared" in any of:
/snap/go/7360/src/github.com/lxc/lxd/shared (from $GOROOT)
/root/go/src/github.com/lxc/lxd/shared (from $GOPATH)
lxd-p2c/main_migrate.go:17:2: cannot find package "github.com/lxc/lxd/shared/api" in any of:
/snap/go/7360/src/github.com/lxc/lxd/shared/api (from $GOROOT)
/root/go/src/github.com/lxc/lxd/shared/api (from $GOPATH)
lxd-p2c/main_netcat.go:12:2: cannot find package "github.com/lxc/lxd/shared/eagain" in any of:
/snap/go/7360/src/github.com/lxc/lxd/shared/eagain (from $GOROOT)
/root/go/src/github.com/lxc/lxd/shared/eagain (from $GOPATH)
lxd-p2c/main_migrate.go:18:2: cannot find package "github.com/lxc/lxd/shared/osarch" in any of:
/snap/go/7360/src/github.com/lxc/lxd/shared/osarch (from $GOROOT)
/root/go/src/github.com/lxc/lxd/shared/osarch (from $GOPATH)
lxd-p2c/main.go:8:2: cannot find package "github.com/lxc/lxd/shared/version" in any of:
/snap/go/7360/src/github.com/lxc/lxd/shared/version (from $GOROOT)
/root/go/src/github.com/lxc/lxd/shared/version (from $GOPATH)
lxd-p2c/transfer.go:13:2: cannot find package "github.com/pborman/uuid" in any of:
/snap/go/7360/src/github.com/pborman/uuid (from $GOROOT)
/root/go/src/github.com/pborman/uuid (from $GOPATH)
lxd-p2c/main_migrate.go:12:2: cannot find package "github.com/pkg/errors" in any of:
/snap/go/7360/src/github.com/pkg/errors (from $GOROOT)
/root/go/src/github.com/pkg/errors (from $GOPATH)
lxd-p2c/main.go:6:2: cannot find package "github.com/spf13/cobra" in any of:
/snap/go/7360/src/github.com/spf13/cobra (from $GOROOT)
/root/go/src/github.com/spf13/cobra (from $GOPATH)
lxd-p2c/utils.go:10:2: cannot find package "golang.org/x/crypto/ssh/terminal" in any of:
/snap/go/7360/src/golang.org/x/crypto/ssh/terminal (from $GOROOT)
/root/go/src/golang.org/x/crypto/ssh/terminal (from $GOPATH)
lxd-p2c/main_migrate.go:14:2: cannot find package "golang.org/x/sys/unix" in any of:
/snap/go/7360/src/golang.org/x/sys/unix (from $GOROOT)
/root/go/src/golang.org/x/sys/unix (from $GOPATH)
make: *** [Makefile:39: lxd-p2c] Error 1
One of the issues is that I do not have the directory ~/go/src/github.com/lxc/lxc
I have this directory instead: ~/go/pkg/mod/github.com/lxc/lxd@v0.0.0-20210417150257-249e78e8ab1b