Skip to content

"no required module provides package" #200

Open
@mozai

Description

@mozai

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions