gluster / gluster-prometheus

Gluster monitoring using Prometheus
GNU Lesser General Public License v2.1
119 stars 70 forks source link

"no required module provides package" #200

Open mozai opened 2 years ago

mozai commented 2 years ago

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