gluster-prometheus icon indicating copy to clipboard operation
gluster-prometheus copied to clipboard

"no required module provides package"

Open mozai opened this issue 3 years ago • 0 comments

Problem:

Software won't build when following the instructions in readme.adoc

Steps taken:

Using Go v1.18.2 on Linux

mkdir -p $GOPATH/src/github.com/gluster
cd $GOPATH/src/github.com/gluster
git clone https://github.com/gluster/gluster-prometheus.git
cd gluster-prometheus
./scripts/install-reqs.sh
PREFIX=/usr make

Seen:

Building gluster-exporter v0.3-dev.93.git3ebaacc no required module provides package github.com/gluster/gluster-prometheus/gluster-exporter: go.mod file not found in current directory or any parent directory; see 'go help modules' make: *** [Makefile:66: build/gluster-exporter] Error 1

other information

Seems to be a requirement in Go versions after 1.16. A StackExchange answer has a workaround:
GO111MODULE=auto PREFIX=/usr make

mozai avatar Jun 01 '22 15:06 mozai