Geth及mac上安装Geth

Geth介绍

Geth别名go-ethereum,是以太坊协议的三种实现之一,由Go语言开发,完全开源的项目。

Geth作用

Geth是以太坊协议的具体落地实现,通过Geth,你可以实现以太坊的各种功能,如账户的新建编辑删除,开启挖矿,ether币的转移,智能合约的部署和执行等等

本文安装环境:

mac os 10.13.4 

Geth安装

brew tap ethereum/ethereum
brew install ethereum

如果命令返回

-bash: brew: command not found

则需先安装Homebrew,运行命令

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
如果安装过程中提示:
xcode-select: error: invalid developer directory '/Library/Developer/CommandLineTools'
Failed during: /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools

表示你安装的是较新版本的xcode,和旧版目录不一致或者需要更新xcode-select:

手动设置(确保是目录/Applications下,而不是/Users/{user}/Applications)

sudo xcode-select --switch /Applications/Xcode.app

执行以下命令更新xcode-select

xcode-select --install

mac系统会提示安装xcode-select

至此Homebrew安装成功,可以顺利安装Geth了。

最后检查安装是否成功

geth VERSION


引用:

https://github.com/ethereum/go-ethereum/wiki/Installation-Instructions-for-Mac
https://brew.sh/

猜你喜欢

转载自blog.csdn.net/cs380637384/article/details/80017854
今日推荐