安装BTCD

  • Install Go according to the installation instructions here: http://golang.org/doc/install
  • Ensure Go was installed properly and is a supported version:
  • $ go version
  • $ go env GOROOT GOPATH
NOTE: The GOROOT and GOPATH above must not be the same path. It is recommended that GOPATH is set to a directory in your home directory such as ~/goprojects to avoid write permission issues. It is also recommended to add $GOPATH/bin to your PATH at this point.
  • Run the following commands to obtain btcd, all dependencies, and install it:
  • $ go get -u github.com/Masterminds/glide
  • $ git clone https://github.com/btcsuite/btcd $GOPATH/src/github.com/btcsuite/btcd
  • $ cd $GOPATH/src/github.com/btcsuite/btcd
  • $ glide install
  • $ go install . ./cmd/...
  • btcd (and utilities) will now be installed in $GOPATH/bin. If you did not already add the bin directory to your system path during Go installation, we recommend you do so now.
`glide install`会遇到一些问题, 因为因为依赖一些google的类库, 不翻墙是不行的.
里面是btcd的依赖:
  • package: github.com/btcsuite/btcd
  • import:
  • - package: github.com/btcsuite/btclog
  • - package: github.com/btcsuite/btcutil
  •   subpackages:
  •   - bloom
  •   - hdkeychain
  • - package: github.com/btcsuite/go-socks
  •   subpackages:
  •   - socks
  • - package: golang.org/x/crypto
  •   subpackages:
  •   - ripemd160
  • - package: github.com/btcsuite/goleveldb
  •   subpackages:
  •   - leveldb
  •   - leveldb/comparer
  •   - leveldb/errors
  •   - leveldb/filter
  •   - leveldb/iterator
  •   - leveldb/opt
  •   - leveldb/util
  • - package: github.com/btcsuite/websocket
  • - package: github.com/btcsuite/winsvc
  •   subpackages:
  •   - eventlog
  •   - mgr
  •   - svc
  • - package: github.com/davecgh/go-spew
  •   subpackages:
  •   - spew
  • - package: github.com/jessevdk/go-flags
  •   version: 1679536dcc895411a9f5848d9a0250be7856448c
  • - package: github.com/jrick/logrotate
里面有个 `package: golang.org/x/crypto`, 相办法自己下载这个库, 
下载它, 放到GOPATH/src下, 然后从`glide.yaml`删除
  • - package: golang.org/x/crypto
  •   subpackages:
  •   - ripemd160
然后再 `glide install`
立即登录, 发表评论.
没有帐号? 立即注册