第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

go build 找不到包源

go build 找不到包源

Go
慕的地6264312 2023-05-08 16:28:58
我正在嘗試構(gòu)建我在此repo中找到的 teamcity prometheus exporter 。在自述文件中,它指示我執(zhí)行以下應(yīng)該構(gòu)建項目的命令 - docker run --rm -v "$PWD":/go/src/github.com/guidewire/teamcity_exporter -w /go/src/github.com/guidewire/teamcity_exporter -e GOOS=linux -e GOARCH=amd64 golang:1.8 go build -o bin/teamcity_exporter -v但它失敗并出現(xiàn)以下錯誤 -teamcity_exporter.go:15:2: cannot find package "github.com/guidewire/teamcity-go-bindings" in any of:    /go/src/github.com/guidewire/teamcity_exporter/vendor/github.com/guidewire/teamcity-go-bindings (vendor tree)    /usr/local/go/src/github.com/guidewire/teamcity-go-bindings (from $GOROOT)    /go/src/github.com/guidewire/teamcity-go-bindings (from $GOPATH)teamcity_exporter.go:16:2: cannot find package "github.com/orcaman/concurrent-map" in any of:    /go/src/github.com/guidewire/teamcity_exporter/vendor/github.com/orcaman/concurrent-map (vendor tree)    /usr/local/go/src/github.com/orcaman/concurrent-map (from $GOROOT)    /go/src/github.com/orcaman/concurrent-map (from $GOPATH)collector.go:6:2: cannot find package "github.com/prometheus/client_golang/prometheus" in any of:    /go/src/github.com/guidewire/teamcity_exporter/vendor/github.com/prometheus/client_golang/prometheus (vendor tree)    /usr/local/go/src/github.com/prometheus/client_golang/prometheus (from $GOROOT)    /go/src/github.com/prometheus/client_golang/prometheus (from $GOPATH)teamcity_exporter.go:18:2: cannot find package "github.com/prometheus/common/log" in any of:    /go/src/github.com/guidewire/teamcity_exporter/vendor/github.com/prometheus/common/log (vendor tree)    /usr/local/go/src/github.com/prometheus/common/log (from $GOROOT)    /go/src/github.com/prometheus/common/log (from $GOPATH)我嘗試四處尋找 go 包管理器并使用它們來預(yù)安裝包(遍歷dep和govendor但兩者似乎都不適合我的用例)。還在 github 存儲庫中打開了一個問題,但還有一些其他問題沒有得到任何回應(yīng),所以我沒有抱太大希望。我對 go 不太熟悉,所以我希望這里的人可能知道我缺少什么。謝謝!
查看完整描述

1 回答

?
12345678_0001

TA貢獻1802條經(jīng)驗 獲得超5個贊

我建議go build改為go get. 這應(yīng)該獲取所有依賴項,還將構(gòu)建二進制文件并將其放入$GOPATH/bingo build期望一切都已經(jīng)到位。



查看完整回答
反對 回復(fù) 2023-05-08
  • 1 回答
  • 0 關(guān)注
  • 213 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號