Skip to content

Instantly share code, notes, and snippets.

@anilcse
Last active May 1, 2020 15:18
Show Gist options
  • Save anilcse/b51fea232fb0fcf68cf6d61b065753a4 to your computer and use it in GitHub Desktop.
Save anilcse/b51fea232fb0fcf68cf6d61b065753a4 to your computer and use it in GitHub Desktop.
## To fix checksum mismatch btcd error something like below:
```verifying github.com/btcsuite/btcd@v0.20.0-beta: checksum mismatch
downloaded: h1:PamBMopnHxO2nEIsU89ibVVnqnXR2yFTgGNc+PdG68o=
go.sum: h1:DnZGUjFbRkpytojHWwy6nfUSA7vFrzWXDLpFNzt74ZA=
make: *** [Makefile:92: build] Error 1```
1. Ensure you have latest go (go1.13+)
2. go get -d github.com/btcsuite/btcd
Retry your build, it should work

Install go on Ubuntu 14.04 16.04 18.04

sudo apt update
sudo apt install build-essential jq -y
wget https://dl.google.com/go/go1.14.linux-amd64.tar.gz
tar -xvf go1.14.linux-amd64.tar.gz
sudo mv go /usr/local

Add $GOPATH, $GOBIN and both to $PATH

echo "" >> ~/.bashrc
echo 'export GOPATH=$HOME/go' >> ~/.bashrc
echo 'export GOROOT=/usr/local/go' >> ~/.bashrc
echo 'export GOBIN=$GOPATH/bin' >> ~/.bashrc
echo 'export PATH=$PATH:/usr/local/go/bin:$GOBIN' >> ~/.bashrc

Update source

source ~/.bashrc

Go installation is done. Check version by typing go version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment