- Head to the download website
- Click the latest version and download the
.msifile
- Create
GOROOTsystem variable if it doesn't exist inC:\Go - Create a
PATHenvironment variable atC:\Go\bin - Create a working environment system variable called
GOPATHat a location where you want your Go projects install- If you check around github, this is referred to as
$GOPATHin Mac/Linux or%GOPATH%in Windows - Don't be confused, it's just a convenient shortcut
- For example: we'll create a new system variable called
GOPATHatC:\OpenBazaar\Go - Here
%GOPATH%isC:\OpenBazaar\Go - So
%GOPATH%\src\github.comis the same as writingC:\OpenBazaar\Go\src\github.com
- For example: we'll create a new system variable called
- Check to see if this worked by opening a new terminal and typing
echo %GOPATH%- The output should the path you set in the system variable (i.e.
C:\OpenBazaar\Goin our example)
- The output should the path you set in the system variable (i.e.
- If you check around github, this is referred to as
- Close and reopen the terminal to ensure the paths are set
- Install
gx- Open the terminal and type
go get -u github.com/whyrusleeping/gx- This will install
gxin%GOPATH%\src\github.com\whyrusleeping/gx
- This will install
- Open the terminal and type
- Install
gx-go- Open the terminal and type
go get -u github.com/whyrusleeping/gx-go- This will install
gx-goin%GOPATH%\src\github.com\whyrusleeping/gx-go
- This will install
- Open the terminal and type
- Close and reopen the terminal to ensure the paths are set
-
Download without installing
ipfs- Open the terminal and type
go get -d github.com/ipfs/go-ipfs- This will install
ipfsin%GOPATH%\src\github.com\ipfs\go-ipfs\
- This will install
- Then type
cd %GOPATH%\src\github.com\ipfs\go-ipfs - Install with
gxwith the following commandgx --verbose install --global - Then type
cd cmd/ipfs && go build - IPFS should now be installed, test to see if you get a response by typing
ipfsin the terminal
- Open the terminal and type
-
Add
ipfs.exeto your environment variables path%GOPATH%\src\github.com\ipfs\go-ipfs\cmd\ipfs(use the full file path, don't write in%GOPATH)
-
Special thanks to
lgierth