Installation guide
Sedge is currently only available for Linux and macOS, and both amd64 and arm64 architectures. You can use any of the following methods to install Sedge:
Download binary from release page
Downloading any binary from the internet comes with the risk of downloading files which malicious, third-party actors have injected with malware. All users should check that they are downloading the correct, clean binary, from a reputable source.
- Download correct binary for the machine you want to use for Sedge from the releases page, i.e choose the correct target OS / Arch. For example: if your machine is a Intel / M1 mac then download the
darwin-amd64
/darwin-arm64
binary. You can also download the binary from the CLI (command line interface) or Terminal withcurl
andwget
:
- curl
- wget
curl -L https://github.com/NethermindEth/sedge/releases/download/v<VERSION>/sedge-v<VERSION>-<OS>-<ARCH> --output sedge
wget https://github.com/NethermindEth/sedge/releases/download/v<VERSION>/sedge-v<VERSION>-<OS>-<ARCH> -O sedge
Replace
<VERSION>
with the desired version number, e.g 0.1.2;<OS>
with your OS, e.g linux; and<ARCH>
with your architecture, e.g amd64.
- Open a console or terminal instance on the directory in which you downloaded the binary.
- Set binary as executable executing
chmod +x <binary>
in the terminal. Replace<binary>
with the name of the downloaded binary. - Run Sedge
./sedge --help
to check if the executable is ok. The.
represents the current directory (where your terminal session is pointing to) - (Optional) Put the binary in your PATH with
cp <binary> /usr/local/bin/sedge
so you can execute Sedge from any directory using the terminal. Trysedge --help
now.
Using Homebrew
First install the Homebrew package manager using the official install script located on their homepage.
After installing Homebrew, you are ready to install Sedge by tapping into the official Sedge repository and installing it:
brew install nethermindeth/sedge/sedge
If you want to update Sedge, you can use the following commands:
brew update
brew upgrade sedge
If you want to remove Sedge, you can use:
brew uninstall sedge
brew untap nethermindeth/sedge
Using Go
First install the Go programming language following the official instructions. You need at least the 1.18.2
version.
If you want to install Sedge in a M1 mac, then you need the darwin-arm64
package. You can find it clicking on other downloads from the Go install page.
This command will install the sedge
executable along with the library and its dependencies in your system:
go install github.com/NethermindEth/sedge/cmd/sedge@latest
The executable will be in your $GOBIN
($GOPATH/bin
).
To check if the GOBIN
is not in your PATH, you can execute echo $GOBIN
from the terminal. If it doesn't print anything, then is not in your PATH. To add GOBIN
to your PATH, add the following lines to your $HOME/.profile:
export GOBIN=$GOPATH/bin
export PATH=$GOBIN:$PATH
Changes made to a profile file may not apply until the next time you log into your computer. To apply the changes immediately, just run the shell commands directly or execute them from the profile using a command such as source $HOME/.profile.
Build from source
With this method, you generate the binary manually (need Go installed) downloading and compiling the source code:
git clone https://github.com/NethermindEth/sedge.git
cd sedge
mkdir -p build
go build -o build/sedge cmd/sedge/main.go
or if you have make
installed:
git clone https://github.com/NethermindEth/sedge.git
cd sedge
make compile
The executable will be in the build
folder.
In case you want the binary in your PATH (or if you used the Using Go method and you don't have $GOBIN
in your PATH), please copy the binary to /usr/local/bin
:
# Using Go
sudo cp $GOPATH/bin/sedge /usr/local/bin/
# Build from source
sudo cp sedge/build/sedge /usr/local/bin/