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
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 v1.1.0
go: finding v0.0.0-20150106093220-6724a57986af
go: unrecognized import path "" (https fetch: Get x509:certificate has expired or is not yet valid)                       
go: finding v1.0.0-20180628173108-788fd7840127
go: finding v0.9.3-0.20181113175235-c63644206701
go: finding v0.0.0-20190507164030-5867b95ac084
go: finding v1.8.5
go: finding v1.3.2
go: finding v1.12.0
go: finding v1.0.0
go: finding v1.0.0
go: finding v0.0.0-20181107165924-66b7b1311ac8
go: finding v0.7.1
go: unrecognized import path "" (https fetch: Get x509: certificate has expired or is not yet valid)
go: error loading module requirements

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 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.