Merge branch 'website' of github.com:ethereum/go-ethereum into fix-flashing

pull/26516/head
Nicolás Quiroz 2 years ago
commit 8e88cfae52
  1. 56
      docs/getting-started/installing-geth.md

@ -199,41 +199,24 @@ docker run -it -p 30303:30303 ethereum/client-go
## Build from source code {#build-from-source}
### Most Linux systems and macOS {#linux-and-macos}
### Linux and Mac {#linux-and-mac}
Geth is written in [Go](https://golang.org/), so building from source code requires the most recent version of Go to be installed. Instructions for installing Go are available at the [Go installation page](https://golang.org/doc/install) and necessary bundles can be downloaded from the [Go download page](https://golang.org/dl/).
With Go installed, Geth can be downloaded into a `GOPATH` workspace via:
```sh
go get -d github.com/ethereum/go-ethereum
```
You can also install specific versions via:
The `go-ethereum` repository should be cloned locally. Then, the command `make geth` configures everything for a temporary build and cleans up afterwards. This method of building only works on UNIX-like operating systems, and a Go installation is still required.
```sh
go get -d github.com/ethereum/go-ethereum@v1.9.21
```
The above commands do not build any executables. To do that you can either build one specifically:
```sh
go install github.com/ethereum/go-ethereum/cmd/geth
```
Alternatively, the following command, run in the project root directory (`ethereum/go-ethereum`) in the GO workspace, builds the entire project and installs Geth and all the developer tools:
```sh
go install ./...
git clone https://github.com/ethereum/go-ethereum.git
cd go-ethereum
make geth
```
For macOS users, errors related to macOS header files are usually fixed by installing XCode Command Line Tools with `xcode-select --install`.
Another common error is: `go: cannot use path@version syntax in GOPATH mode`. This and other similar errors can often be fixed by enabling gomodules using `export GO111MODULE=on`.
These commands create a Geth executable file in the `go-ethereum/build/bin` folder that can be moved and run from another directory if required. The binary is standalone and doesn't require any additional files.
Updating an existing Geth installation can be achieved using `go get`:
To update an existing Geth installation simply stop the node, navigate to the project root directory and pull the latest version from the Geth GitHub repository. then rebuild and restart the node.
```sh
go get -u github.com/ethereum/go-ethereum
cd go-ethereum
git pull
make geth
```
### Windows {#windows}
@ -290,26 +273,7 @@ To start the node, the followijng command can be run:
build/bin/geth
```
### Building without a Go workflow {#building-without-go}
Geth can also be built without using Go workspaces. In this case, the repository should be cloned to a local repository. Then, the command
`make geth` configures everything for a temporary build and cleans up afterwards. This method of building only works on UNIX-like operating systems, and a Go installation is still required.
```sh
git clone https://github.com/ethereum/go-ethereum.git
cd go-ethereum
make geth
```
These commands create a Geth executable file in the `go-ethereum/build/bin` folder that can be moved and run from another directory if required. The binary is standalone and doesn't require any additional files.
To update an existing Geth installation simply stop the node, navigate to the project root directory and pull the latest version from the Geth GitHub repository. then rebuild and restart the node.
```sh
cd go-ethereum
git pull
make geth
```
Additionally all the developer tools provided with Geth (`clef`, `devp2p`, `abigen`, `bootnode`, `evm`, `rlpdump` and `puppeth`) can be compiled by running `make all`. More information about these tools can be found [here](https://github.com/ethereum/go-ethereum#executables).

Loading…
Cancel
Save