WSL2 Install Error - go: error loading module requirements

Trying to do a fresh install on WSL2 Ubuntu using Homebrew and I get this:

kmuncie@EchoCherry-T460s 20:03 ~
$ go version
go version go1.12.9 linux/amd64
kmuncie@EchoCherry-T460s 20:03 ~
$ brew install hugo
==> Downloading https://github.com/gohugoio/hugo/archive/v0.57.2.tar.gz
Already downloaded: /home/kmuncie/.cache/Homebrew/downloads/c91396f715bcae5967c8b8be4763c5f6fb801c49a90dd95fc2412780023b656e--v0.57.2.tar.gz
==> go build -o /home/linuxbrew/.linuxbrew/Cellar/hugo/0.57.2/bin/hugo -tags extended main.go
Last 15 lines from /home/kmuncie/.cache/Homebrew/Logs/hugo/01.go:
go: finding github.com/kisielk/errcheck v1.1.0
go: finding github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af
go: go.opencensus.io@v0.21.0: unrecognized import path "go.opencensus.io" (https fetch: Get https://go.opencensus.io?go-get=1: x509:certificate has expired or is not yet valid)                       
go: finding gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127
go: finding github.com/wellington/go-libsass v0.9.3-0.20181113175235-c63644206701
go: finding github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084
go: finding github.com/grpc-ecosystem/grpc-gateway v1.8.5
go: finding github.com/spf13/viper v1.3.2
go: finding gopkg.in/resty.v1 v1.12.0
go: finding github.com/ghodss/yaml v1.0.0
go: finding github.com/inconshreveable/mousetrap v1.0.0
go: finding golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8
go: finding github.com/prometheus/tsdb v0.7.1
go: pack.ag/amqp@v0.11.0: unrecognized import path "pack.ag/amqp" (https fetch: Get https://pack.ag/amqp?go-get=1: x509: certificate has expired or is not yet valid)
go: error loading module requirements
READ THIS: https://docs.brew.sh/Troubleshooting

Is this something I can work around or should this be reported on GitHub?

Your error may be WSL2 specific.

In the meantime you can always download a binary of hugo: Friendly reminder, you don't have to wait on a package manager
(you’ll need to tweak it for Linux)

Thanks, I had previously just installed it that way but did not enjoy keeping it manually upgraded. I was hoping to be able to install through the recommended path. May have to move back to that approach.

I had the same concern a while back — wrote a small shell script to automate the upgrade: Script to install latest hugo release on macos and ubuntu

As far as recommended path, I think that comes down to preference.

I assume pack.ag is the package mirror that brew uses on Linux…? And that it has some problems that I’ll assume will be fixed (everyone should face these problems).

Thanks for the suggestions everyone. Turns out my WSL system time was incorrect and so that was causing the errors.