build constraints exclude all Go files when installing OpenTofu

274 Views Asked by At

When I use command go build . to install OpenTofu on Windows 10 and wsl.

It said

package github.com/opentofu/opentofu: build constraints exclude all Go files in /home/trung/opentofu

Before it, I just git clone from github. What can I do to fix it?

I searched online but still don't see any similar case.

1

There are 1 best solutions below

1
Cube On

You'll have to run go build in the cmd/tofu subdirectory of the repository, which contains the main function.