btcsuite / btcd

An alternative full node bitcoin implementation written in Go (golang)
https://github.com/btcsuite/btcd/blob/master/README.md
ISC License
6.11k stars 2.32k forks source link

Unable to "go get github.com/btcsuite/btcutil" #1960

Closed visualbasic6 closed 1 year ago

visualbasic6 commented 1 year ago
root@1999:~# go get github.com/btcsuite/btcd/btec
go: module github.com/btcsuite/btcd@upgrade found (v0.23.4), but does not contain package github.com/btcsuite/btcd/btec

or

root@1999:~# go get github.com/btcsuite/btcutil
github.com/btcsuite/btcutil imports
        github.com/btcsuite/btcd/btcec: cannot find module providing package github.com/btcsuite/btcd/btcec
visualbasic6 commented 1 year ago
bchain imports
        github.com/btcsuite/btcd/tree/master/btcutil: module github.com/btcsuite/btcd@latest found (v0.23.4), but does not contain package github.com/btcsuite/btcd/tree/master/btcutil
bchain/btc imports
        github.com/btcsuite/btcd/btcec: module github.com/btcsuite/btcd@latest found (v0.23.4), but does not contain package github.com/btcsuite/btcd/btcec
YiJingGuo commented 1 year ago

Hi guys, could you please tell me how this problem was resolved? I'm facing the same issue and I hope you can help me. 😃

guggero commented 1 year ago

You need to use a specific version of btcd, not @latest. See https://github.com/btcsuite/btcd/tags for valid tags, at the moment that would be [v0.23.4](https://github.com/btcsuite/btcd/releases/tag/v0.23.4). Also, that latest version uses github.com/btcsuite/btcd/btcec/v2, so if you had the github.com/btcsuite/btcd/btcec as an import before, you need to change that to github.com/btcsuite/btcd/btcec/v2.

Timwood0x10 commented 1 year ago

You need to use a specific version of btcd, not @latest. See https://github.com/btcsuite/btcd/tags for valid tags, at the moment that would be [v0.23.4](https://github.com/btcsuite/btcd/releases/tag/v0.23.4). Also, that latest version uses github.com/btcsuite/btcd/btcec/v2, so if you had the github.com/btcsuite/btcd/btcec as an import before, you need to change that to github.com/btcsuite/btcd/btcec/v2.

Thanks guys , the command github.com/btcsuite/btcd/btcec => github.com/btcsuite/btcd v0.23.3 can solve this error.