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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

go build 找不到包源

go build 找不到包源

Go
慕的地6264312 2023-05-08 16:28:58
我正在嘗試構(gòu)建我在此repo中找到的 teamcity prometheus exporter 。在自述文件中,它指示我執(zhí)行以下應(yīng)該構(gòu)建項(xiàng)目的命令 - 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)以下錯(cuò)誤 -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 存儲(chǔ)庫(kù)中打開了一個(gè)問題,但還有一些其他問題沒有得到任何回應(yīng),所以我沒有抱太大希望。我對(duì) go 不太熟悉,所以我希望這里的人可能知道我缺少什么。謝謝!
查看完整描述

1 回答

?
12345678_0001

TA貢獻(xiàn)1802條經(jīng)驗(yàn) 獲得超5個(gè)贊

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



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

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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