gluster / gluster-prometheus

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

make faild. gluster-exporter/conf/conf.go:9:2: cannot find package "." in: #180

Open DuskLi opened 4 years ago

DuskLi commented 4 years ago

Hi, I build the gluster-prometheus follow the README step, but make faild. The operation log is as follows. How should I solve this problem ?

Thanks!

[root@lab-home gluster-prometheus]# PREFIX=/usr make Go1.9 or later is available on the system.

dep package is available gometalinter package is available

Installing vendored packages (1/27) Wrote gopkg.in/yaml.v2@v2.2.2 (2/27) Wrote github.com/pborman/uuid@v1.2 (3/27) Wrote github.com/spf13/cast@v1.3.0 (4/27) Wrote github.com/mitchellh/mapstructure@v1.1.2 (5/27) Wrote github.com/google/uuid@v1.1.0 (6/27) Wrote github.com/prometheus/client_golang@v0.8.0 (7/27) Wrote github.com/BurntSushi/toml@v0.3.1 (8/27) Wrote github.com/beorn7/perks@master (9/27) Wrote github.com/dgrijalva/jwt-go@v3.1.0 (10/27) Wrote github.com/fsnotify/fsnotify@v1.4.7 (11/27) Wrote github.com/golang/protobuf@v1.2.0 (12/27) Wrote github.com/matttproud/golang_protobuf_extensions@v1.0.1 (13/27) Wrote github.com/gluster/glusterd2@master (14/27) Wrote github.com/magiconair/properties@v1.8.0 (15/27) Wrote github.com/pelletier/go-toml@v1.2.0 (16/27) Wrote github.com/hashicorp/hcl@v1.0.0 (17/27) Wrote github.com/prometheus/client_model@master (18/27) Wrote github.com/prometheus/common@master (19/27) Wrote github.com/prometheus/procfs@master (20/27) Wrote github.com/spf13/afero@v1.1.2 (21/27) Wrote github.com/sirupsen/logrus@v1.0.6 (22/27) Wrote github.com/spf13/viper@v1.0.3 (23/27) Wrote github.com/spf13/pflag@v1.0.3 (24/27) Wrote github.com/spf13/jwalterweatherman@v1.0.0 (25/27) Wrote golang.org/x/sys@master (26/27) Wrote golang.org/x/crypto@master (27/27) Wrote golang.org/x/text@v0.3.0

FASTBUILD=yes BASE_PREFIX="" GD1STATEDIR=""/var/lib/glusterd \ CONFFILE=""/etc/gluster-exporter/gluster-exporter.toml \ GD2STATEDIR=""/var/lib/glusterd2 ./scripts/build.sh gluster-exporter Building gluster-exporter v0.3-dev.91.git863db4b gluster-exporter/conf/conf.go:9:2: cannot find package "." in: /root/go/src/github.com/BurntSushi/toml pkg/glusterutils/enable_profile_gd2.go:5:2: cannot find package "." in: /root/go/src/github.com/gluster/glusterd2/pkg/api pkg/glusterutils/common.go:7:2: cannot find package "." in: /root/go/src/github.com/gluster/glusterd2/pkg/restclient gluster-exporter/metric_brick.go:16:2: cannot find package "." in: /root/go/src/github.com/prometheus/client_golang/prometheus gluster-exporter/main.go:17:2: cannot find package "." in: /root/go/src/github.com/prometheus/client_golang/prometheus/promhttp gluster-exporter/metrics.go:7:2: cannot find package "." in: /root/go/src/github.com/prometheus/common/model pkg/glusterutils/enable_profile_gd1.go:5:2: cannot find package "." in: /root/go/src/github.com/sirupsen/logrus make: *** [build/gluster-exporter] Error 1

limiao2008 commented 3 years ago

install go and use go build easyly https://github.com/gluster/gluster-prometheus/issues/187#issuecomment-743019487