Closed PradeepKiruvale closed 6 years ago
Hello, could you give me the go version in your environment please? I'm not sure how "vendor/github.com/hyperhq/runv" was constructed.
go version go1.9 linux/amd64 Because I had the path issue with some packages I did create softlink.
please remove the softlink and try to fix the previous issues. i.e. report it here.
Without softlinks
huawei@localhost runv]$ cli/filesystem.go:9:2: cannot find package "github.com/docker/docker/pkg/mount" in any of: /home/huawei/VHOST/go/src/github.com/docker/docker/pkg/mount (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/docker/docker/pkg/mount (from $GOPATH) cli/main.go:8:2: cannot find package "github.com/docker/docker/pkg/reexec" in any of: /home/huawei/VHOST/go/src/github.com/docker/docker/pkg/reexec (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/docker/docker/pkg/reexec (from $GOPATH) cli/filesystem.go:10:2: cannot find package "github.com/docker/docker/pkg/symlink" in any of: /home/huawei/VHOST/go/src/github.com/docker/docker/pkg/symlink (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/docker/docker/pkg/symlink (from $GOPATH) cli/container.go:15:2: cannot find package "github.com/golang/glog" in any of: /home/huawei/VHOST/go/src/github.com/golang/glog (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/golang/glog (from $GOPATH) cli/container.go:16:2: cannot find package "github.com/hyperhq/runv/api" in any of: /home/huawei/VHOST/go/src/github.com/hyperhq/runv/api (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/hyperhq/runv/api (from $GOPATH) cli/network.go:15:2: cannot find package "github.com/hyperhq/runv/cli/nsenter" in any of: /home/huawei/VHOST/go/src/github.com/hyperhq/runv/cli/nsenter (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/hyperhq/runv/cli/nsenter (from $GOPATH) cli/main.go:10:2: cannot find package "github.com/hyperhq/runv/driverloader" in any of: /home/huawei/VHOST/go/src/github.com/hyperhq/runv/driverloader (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/hyperhq/runv/driverloader (from $GOPATH) cli/sandbox.go:14:2: cannot find package "github.com/hyperhq/runv/factory" in any of: /home/huawei/VHOST/go/src/github.com/hyperhq/runv/factory (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/hyperhq/runv/factory (from $GOPATH) cli/sandbox.go:15:2: cannot find package "github.com/hyperhq/runv/factory/single" in any of: /home/huawei/VHOST/go/src/github.com/hyperhq/runv/factory/single (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/hyperhq/runv/factory/single (from $GOPATH) cli/sandbox.go:16:2: cannot find package "github.com/hyperhq/runv/factory/template" in any of: /home/huawei/VHOST/go/src/github.com/hyperhq/runv/factory/template (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/hyperhq/runv/factory/template (from $GOPATH) cli/kill.go:11:2: cannot find package "github.com/hyperhq/runv/hyperstart/libhyperstart" in any of: /home/huawei/VHOST/go/src/github.com/hyperhq/runv/hyperstart/libhyperstart (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/hyperhq/runv/hyperstart/libhyperstart (from $GOPATH) cli/proxy.go:16:2: cannot find package "github.com/hyperhq/runv/hyperstart/proxy" in any of: /home/huawei/VHOST/go/src/github.com/hyperhq/runv/hyperstart/proxy (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/hyperhq/runv/hyperstart/proxy (from $GOPATH) cli/container.go:17:2: cannot find package "github.com/hyperhq/runv/hypervisor" in any of: /home/huawei/VHOST/go/src/github.com/hyperhq/runv/hypervisor (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/hyperhq/runv/hypervisor (from $GOPATH) cli/container.go:18:2: cannot find package "github.com/hyperhq/runv/lib/linuxsignal" in any of: /home/huawei/VHOST/go/src/github.com/hyperhq/runv/lib/linuxsignal (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/hyperhq/runv/lib/linuxsignal (from $GOPATH) cli/proxy.go:18:2: cannot find package "github.com/hyperhq/runv/lib/telnet" in any of: /home/huawei/VHOST/go/src/github.com/hyperhq/runv/lib/telnet (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/hyperhq/runv/lib/telnet (from $GOPATH) cli/shim.go:16:2: cannot find package "github.com/hyperhq/runv/lib/term" in any of: /home/huawei/VHOST/go/src/github.com/hyperhq/runv/lib/term (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/hyperhq/runv/lib/term (from $GOPATH) cli/filesystem.go:13:2: cannot find package "github.com/hyperhq/runv/lib/utils" in any of: /home/huawei/VHOST/go/src/github.com/hyperhq/runv/lib/utils (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/hyperhq/runv/lib/utils (from $GOPATH) cli/manage.go:11:2: cannot find package "github.com/hyperhq/runv/template" in any of: /home/huawei/VHOST/go/src/github.com/hyperhq/runv/template (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/hyperhq/runv/template (from $GOPATH) cli/network.go:17:2: cannot find package "github.com/kardianos/osext" in any of: /home/huawei/VHOST/go/src/github.com/kardianos/osext (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/kardianos/osext (from $GOPATH) cli/shim.go:18:2: cannot find package "github.com/kr/pty" in any of: /home/huawei/VHOST/go/src/github.com/kr/pty (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/kr/pty (from $GOPATH) cli/container.go:19:2: cannot find package "github.com/opencontainers/runc/libcontainer/system" in any of: /home/huawei/VHOST/go/src/github.com/opencontainers/runc/libcontainer/system (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/opencontainers/runc/libcontainer/system (from $GOPATH) cli/tty.go:12:2: cannot find package "github.com/opencontainers/runc/libcontainer/utils" in any of: /home/huawei/VHOST/go/src/github.com/opencontainers/runc/libcontainer/utils (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/opencontainers/runc/libcontainer/utils (from $GOPATH) cli/container.go:20:2: cannot find package "github.com/opencontainers/runtime-spec/specs-go" in any of: /home/huawei/VHOST/go/src/github.com/opencontainers/runtime-spec/specs-go (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/opencontainers/runtime-spec/specs-go (from $GOPATH) cli/create.go:13:2: cannot find package "github.com/urfave/cli" in any of: /home/huawei/VHOST/go/src/github.com/urfave/cli (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/urfave/cli (from $GOPATH) cli/network.go:19:2: cannot find package "github.com/vishvananda/netlink" in any of: /home/huawei/VHOST/go/src/github.com/vishvananda/netlink (from $GOROOT) /home/huawei/VHOST/runv/src/github.com/vishvananda/netlink (from $GOPATH) cli/proxy.go:22:2: cannot find package "google.golang.org/grpc" in any of: /home/huawei/VHOST/go/src/google.golang.org/grpc (from $GOROOT) /home/huawei/VHOST/runv/src/google.golang.org/grpc (from $GOPATH)
it seams that the GOPATH and GOROOT are both messy in the environment.
I think they should both be /home/huawei/VHOST/
, rather than the sub directories inside the /home/huawei/VHOST/.
May be not the issue with these, because I have other go projects, they work fine with the same kind of GOPATH and GOROOT
the runv repo should be put into one of the GOPATH. as GOPATH/src/github.com/hyperhq/runv
That is why I did create the softlinks!.
softlinks is not GOPATH. please setup the GOPATH.
I have setup, GOPATH. Here is my go env. WIth this GOPATH I get the error whatever I posted on my first query.
GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/huawei/VHOST/runv/src/github.com/hyperhq/runv/" GORACE="" GOROOT="/home/huawei/VHOST/go" GOTOOLDIR="/home/huawei/VHOST/go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build133268448=/tmp/go-build -gno-record-gcc-switches" CXX="g++" CGO_ENABLED="1" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2"
Oh, in this case, GOPATH should have the "/home/huawei/VHOST/runv/". such as GOPATH="/home/huawei/VHOST/runv/"
or there are multiple go installed in you environment.
Got it worked, thanks!
Could you give more detail? So that we can check if runv's building cannot work in some uncommon cases?
Hi, I did clone from github and not able to build runv. Facing below issues. Please let me know how can I resolve these.
Regards, Pradeep