-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Description
I am attempting to install image-tools on my MacOS, and I am not super familiar with go, to be honest. My goal is to validate images before pushing to a registry.
following your instructions, i am able to get the following working
$ go get -d github.com/opencontainers/image-tools/cmd/oci-image-tool
but the cd command doesn't work because it seems to go to a different path. here's the Makefiles i found in my GOPATH:
./pkg/mod/github.com/cpuguy83/go-md2man/[email protected]/Makefile
./pkg/mod/github.com/opencontainers/[email protected]/Makefile
./pkg/mod/github.com/opencontainers/[email protected]/Makefile
./pkg/mod/github.com/opencontainers/[email protected]/schema/Makefile
./pkg/mod/github.com/opencontainers/[email protected]/Makefile
./pkg/mod/github.com/pkg/[email protected]/Makefile
so i changed directory to the image-tools one. but when I run make all i have the following error:
$ make all
go build -ldflags "-X main.gitCommit=" -o oci-image-tool ./cmd/oci-image-tool
cmd/oci-image-tool/main.go:21:2: cannot find package "github.com/Sirupsen/logrus" in any of:
/usr/local/Cellar/go/1.22.1/libexec/src/github.com/Sirupsen/logrus (from $GOROOT)
/Users/noronhaa/Documents/rungo/src/github.com/Sirupsen/logrus (from $GOPATH)
cmd/oci-image-tool/validate.go:23:2: cannot find package "github.com/opencontainers/image-spec/schema" in any of:
/usr/local/Cellar/go/1.22.1/libexec/src/github.com/opencontainers/image-spec/schema (from $GOROOT)
/Users/noronhaa/Documents/rungo/src/github.com/opencontainers/image-spec/schema (from $GOPATH)
cmd/oci-image-tool/create.go:21:2: cannot find package "github.com/opencontainers/image-tools/image" in any of:
/usr/local/Cellar/go/1.22.1/libexec/src/github.com/opencontainers/image-tools/image (from $GOROOT)
/Users/noronhaa/Documents/rungo/src/github.com/opencontainers/image-tools/image (from $GOPATH)
cmd/oci-image-tool/main.go:22:2: cannot find package "github.com/opencontainers/image-tools/version" in any of:
/usr/local/Cellar/go/1.22.1/libexec/src/github.com/opencontainers/image-tools/version (from $GOROOT)
/Users/noronhaa/Documents/rungo/src/github.com/opencontainers/image-tools/version (from $GOPATH)
cmd/oci-image-tool/validate.go:25:2: cannot find package "github.com/pkg/errors" in any of:
/usr/local/Cellar/go/1.22.1/libexec/src/github.com/pkg/errors (from $GOROOT)
/Users/noronhaa/Documents/rungo/src/github.com/pkg/errors (from $GOPATH)
cmd/oci-image-tool/create.go:22:2: cannot find package "github.com/urfave/cli" in any of:
/usr/local/Cellar/go/1.22.1/libexec/src/github.com/urfave/cli (from $GOROOT)
/Users/noronhaa/Documents/rungo/src/github.com/urfave/cli (from $GOPATH)
make: *** [tool] Error 1
I still get the logrus error even after installing that package. Seems like go or the Makefile wants to find files and installations at very specific locations but my paths are all messed up. Can you provide guidance on this?
Metadata
Metadata
Assignees
Labels
No labels