From 24e41c843bf5cc363387871b9d8df0598395974c Mon Sep 17 00:00:00 2001 From: Steven Roose Date: Sun, 22 May 2016 00:30:26 +0200 Subject: [PATCH] Update installation instructions using Glide (#698) The main README.md file had newer installation that uses Glide, while these did not. --- docs/README.md | 47 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/docs/README.md b/docs/README.md index 6389786708..cb86fb1905 100644 --- a/docs/README.md +++ b/docs/README.md @@ -70,11 +70,48 @@ details on how to install on the supported operating systems. **2.1.2 Linux/BSD/MacOSX/POSIX Installation**
-* Install Go according to the installation instructions here: http://golang.org/doc/install -* Run the following command to ensure your Go version is at least version 1.2: `$ go version` -* Run the following command to obtain btcd, its dependencies, and install it: `$ go get github.com/btcsuite/btcd/...`
- * To upgrade, run the following command: `$ go get -u github.com/btcsuite/btcd/...` -* Run btcd: `$ btcd` +- Install Go according to the installation instructions here: + http://golang.org/doc/install + +- Ensure Go was installed properly and is a supported version: + +```bash +$ 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. + +**NOTE:** If you are using Go 1.5, you must manually enable the vendor +experiment by setting the `GO15VENDOREXPERIMENT` environment variable to `1`. +This step is not required for Go 1.6. + +- Run the following commands to obtain btcd, all dependencies, and install it: + +```bash +$ 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. + +**Updating** + +- Run the following commands to update btcd, all dependencies, and install it: + +```bash +$ cd $GOPATH/src/github.com/btcsuite/btcd +$ git pull && glide install +$ go install . ./cmd/... +```
**2.1.2.1 Gentoo Linux Installation**