Geth simple build guide for OSX

StephanTualStephanTual London, EnglandMember, Moderator Posts: 1,282 mod
edited July 2015 in Geth - Go Implementation

Introduction

This tutorial describes how to build the Go Ethereum Implementation from source on OSX Mavericks.

Since POC5, new PoC binaries are now released regularly on https://github.com/ethereum/go-ethereum/releases. This makes building from source a little less necessary than it used to, which is a good thing. That said, sometimes you might want to be building from source regardless, and the below guide should help you.

The below should work on any OSX Mavericks installation, and was successfully tested on a completely new install of OSX Mavericks.

For convenience, if you're worried about messing things up, you can always use a http://parallels.com virtual machine installed from your recovery partition - they offer a 14 day trial.

If you're finding yourself having difficulties, please post your question in the Go category: http://forum.ethereum.org/categories/go-implemenation.

Finally, for all documentation please refer to the wiki: https://github.com/ethereum/go-ethereum/wiki.


Installing

Keep in mind it is important that you do not use sudo. Sudoing is not required in most cases (after all, you installed most of your OSX apps without requiring it) and could lead to path issues down the line.

Install Brew

First, install brew. Installing brew will also install the xcode tools that are needed.

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Now run brew doctor

brew doctor



Install Go and Dependencies

brew install gmp go

You no longer need to worry about setting up GOPATH etc... like you did in the previous tutorials.
You no longer need to install QT as Mist is now an Electron single page app, and is installed separately.



Install Go Ethereum

Find a nice folder to put go-ethereum in, then:
git clone https://github.com/ethereum/go-ethereum
cd go-ethereum
make geth


Run Go Ethereum!

You should now be able to use Geth, the go-ethereum CLI!

~/YOURFOLDER/go-ethereum/build/bin/geth console

CLI switches are documented here: https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options


Troubleshooting

Note that the develop branch can sometimes have bugs, preventing it from building. If you hit such an issue let us know in the forums.

Your config files are in:
~/Library/Ethereum (contains the chain)
~/Library/Ethereum/keystore (contains your keys)
~/.ethash (contains the DAG when mining)


Upgrading

To upgrade to the latest release, simply go to the folder where you git cloned go-ethereum, and type
git pull
make geth

What's next?

To get started with Ethereum, the best place is our official gitbook at: http://ethereum.gitbooks.io/frontier-guide/content/

Once you have digested that, you can dig into the official solidity tutorial: https://github.com/ethereum/wiki/wiki/Solidity-Tutorial

If it's mining you'd like to learn more about, the guide is at https://forum.ethereum.org/discussion/197/mining-faq-live-updates




---------
Update History:
13/05/2014 - Initial release
17/05/2014 - Added QT 5.2.0 specific instructions
17/05/2014 - Added upgrade instructions
18/05/2014 - Corrected typo on export GOPATH command
20/05/2014 - Specific version of QT no longer required
23/05/2014 - Re-added QT 5.2.0 specific instructions
26/05/2014 - Updated for PoC5 RC9
26/05/2014 - Added workaround for those who had brewed QT5.2.1 prior to installing 5.2.0
29/05/2014 - Confirmed working 100% on PoC5 RC11 clean build
11/06/2014 - Updated for PoC5 RC12
17/06/2014 - Temporarily updated Edge instructions
26/06/2014 - Confirmed up to date as of PoC5 RC14
26/06/2014 - Updated Edge instructions
26/06/2014 - Added warning for RC15
28/06/2014 - Updated for RC15
29/06/2014 - Added Super Lazy One Line Install (tm) guide
30/06/2014 - fixed invalid SLOLI link
06/07/2014 - updated SLOLI to 1.0.8
26/07/2014 - added note about new POC release site
01/09/2014 - Updated both SLOLI and step-by-step for PoC 0.6.4
13/07/2014 - Updated for Frontier RC2 - what a difference a year makes!
Post edited by StephanTual on
This discussion has been closed.