LoginSignup
1
1

More than 5 years have passed since last update.

macにGethを入れる方法(翻訳)

Last updated at Posted at 2018-03-11

本記事は Installation Instructions for Mac を翻訳・加筆したものです。

Homebrewをインストールする

Homebrewを使えば、gethを最も簡単にインストールできるらしいので早速インストールします。

MacにHomebrewをインストールする



gethをインストールする

Homebrewはbrew tapによって外部のリポジトリをフォーミュラとして追加することができます。

1. 以下のコマンドからtapを追加してgethをインスール

brew tap ethereum/ethereum
brew install ethereum




2. --devel を使ってdevelop branchをインストール

brew install ethereum --devel



3. ノードにアカウントを作成する

geth account new




gethのコードのオプションはgeth --helpまたは以下のページから参照できます。

homebrew-ethereum


ソースコードをビルドする

1. まず、任意のディレクトリにリポジトリをクローンします。
git clone https://github.com/ethereum/go-ethereum



2. gethのビルドにはGo言語のコンパイラをインストールする必要があります。
brew install go



3. 以下のコマンドでgethが動くか確認してみましょう。
cd go-ethereum
make geth



エラーを吐く場合

Mac OS system library関係のエラーであればXcode Command Line Toolsが正しくインストールされているか確認しましょう。
xcode-select --install



↓こんな感じで表示される場合はちゃんとインストールされています。↓
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1