I tried running go get -u github.com/fxamacker/cbor/v2
, but I get this error:
package github.com/fxamacker/cbor/v2: cannot find package "github.com/fxamacker/cbor/v2" in any of: /usr/local/go/src/github.com/fxamacker/cbor/v2 (from $GOROOT) /go/src/github.com/fxamacker/cbor/v2 (from $GOPATH)
I get the same error when I run without the -u
flag.
I am using Go 1.10 because one of the requirements for my project is that it supports Windows Vista, and Go 1.10 is the latest version of Go that will build for Vista (source).
Here is a Dockerfile to reproduce this:
FROM golang:1.10.8-alpine@sha256:549535d72baf28b3d1470ef9fcc6d4e0cb52c7fc3012655a659b65eaf942ec63 as builder
RUN apk add --no-cache git
ENV GOOS=windows
ARG GOARCH
RUN go get -u github.com/fxamacker/cbor/v2
You can reproduce with the issue with the following command:
docker build -t test --build-arg GOARCH=386 .
This project is still available: https://pkg.go.dev/github.com/fxamacker/cbor/v2
Why does my go get
fail?
I looked at the go.mod
for the package. It requires a minimum go of 1.12 on master
. Could this be why the go get
fails?