Install Go Livepeer
Depending on your workflow, you may prefer to install go-livepeer
using a binary release, a Docker image, or from source.
Install using a Binary Release
Dependencies
# For ubuntu
apt install curl coreutils gnupg2
# For macOS
brew install curl coreutils gnupg
Darwin (macOS)
# <RELEASE_VERSION> is the release version, e.g. v0.5.35
# <ARCH> is the chip architecture (use arm64 for M1 and amd64 for Intel)
wget https://github.com/livepeer/go-livepeer/releases/download/<RELEASE_VERSION>/livepeer-darwin-<ARCH>.tar.gz
# Next, extract it
tar -zxvf livepeer-darwin-<ARCH>.tar.gz
# Finally, move it to the appropriate directory
mv livepeer-darwin-<ARCH>/* /usr/local/bin/
Linux
# <RELEASE_VERSION> is the release version, e.g. v0.5.35
# <ARCH> is the chip architecture (use arm64 or amd64)
# Fetch the latest release
wget https://github.com/livepeer/go-livepeer/releases/download/<RELEASE_VERSION>/livepeer-linux-<ARCH>.tar.gz
# Next, extract it
tar -zxvf livepeer-linux-amd64.tar.gz
# Finally, move it to the appropriate directory
mv livepeer-linux-amd64/* /usr/local/bin/
Linux GPU
There is a separate binary which supports transcoding on the NVIDIA GPU. The requirement for this binary is to have CUDA Toolkit (opens in a new tab) installed on your machine.
# <RELEASE_VERSION> is the release version, e.g. v0.5.35
# <ARCH> is the chip architecture (use arm64 or amd64)
# Fetch the latest release
wget https://github.com/livepeer/go-livepeer/releases/download/<RELEASE_VERSION>/livepeer-linux-gpu-<ARCH>.tar.gz
# Next, extract it
tar -zxvf livepeer-linux-gpu-<ARCH>.tar.gz
# Finally, move it to the appropriate directory
mv livepeer-linux-gpu-<ARCH>/* /usr/local/bin/
Windows
# <RELEASE_VERSION> is the release version, e.g. v0.5.35
# Fetch the latest release .zip
wget https://github.com/livepeer/go-livepeer/releases/download/<RELEASE_VERSION>/livepeer-windows-amd64.zip
# Next, extract it
unzip livepeer-windows-amd64.zip
# Finally, move it to the appropriate directory, e.g. C:\Users\UserName\livepeer-folder
move livepeer-windows-amd64 e.g. C:\Users\UserName\livepeer-folder
At this time Livepeer does not provide automatic updates. You can perform a manual update or use a script. A community-created Bash script to update Livepeer is available on the livepeer Forum (opens in a new tab).
Third-party packages
Packages for different Linux distributions are maintained by Livepeer community members. Before using these packages, please verify that they have been updated to use the latest builds of go-livepeer (opens in a new tab). This list will be updated as a best-effort, but we cannot guarantee if individual packages are up to date or verify their integrity.
In the future, Livepeer core contributors may publish official packages for the distributions below.
Platform | Installation | Source |
---|---|---|
Arch Linux | paru go-livepeer-bin | https://aur.archlinux.org/packages/go-livepeer-bin/ (opens in a new tab) |
Install using a Docker image
Prerequisites
If you do not have Docker installed, you will need to install it using the guide here (opens in a new tab) before running the commands below.
Installation
With every release, Docker images are pushed to DockerHub (opens in a new tab).
# <RELEASE_VERSION> is the release version i.e. 0.5.14
docker pull livepeer/go-livepeer:<RELEASE_VERSION>
Running livepeer-cli with Docker
Once you've pulled the image, retrieve the image id and start the container.
Any flags you provide will be passed to the binary, so you can pass your configuration here.
docker run <image id> <livepeer configuration flags>
# Mac M1 only
docker run --platform linux/amd64 <image id> <livepeer configuration flags>
Once you've started the container, retrieve the name and start the CLI
docker exec -it <container_name> livepeer_cli
Installing pre-releases with Docker
To pull the latest pre-release version:
docker pull livepeer/go-livepeer:master
Build from source
System dependencies
Building livepeer
requires some system dependencies.
Linux (Ubuntu: 16.04 or 18.04)
apt-get update && apt-get -y install build-essential pkg-config autoconf git curl yasm
Linux (Ubuntu: 20.04)
apt-get -y install protobuf-compiler-grpc golang-goprotobuf-dev yasm
To enable transcoding using Nvidia GPUs on Linux systems
- CUDA Toolkit (opens in a new tab) must be installed on the system
clang
must be installed as well. The script that will installffmpeg
dependencies useswhich clang
command to determine whetherclang
is installed or not. Please check this on your system. If the path is empty, please installclang
. For example on the Ubuntu machine one can do
apt-get -y install clang clang-tools
Darwin (macOS)
brew update && brew install pkg-config autoconf
Go
Building livepeer
requires Go. Follow the
official Go installation instructions (opens in a new tab).
Build and install
- Clone the repository:
git clone https://github.com/livepeer/go-livepeer.git
cd go-livepeer
- Install
ffmpeg
dependencies:
./install_ffmpeg.sh
- Set build environment variables.
Set the PKG_CONFIG_PATH
variable so that pkg-config
can find the ffmpeg
dependency files installed in step 2:
# install_ffmpeg.sh stores ffmpeg dependency files in this directory by default
export PKG_CONFIG_PATH=~/compiled/lib/pkgconfig
Set the BUILD_TAGS
variable to enable mainnet support:
export BUILD_TAGS=mainnet
# To build with support for only development networks and the Rinkeby test network
# export BUILD_TAGS=rinkeby
# To build with support for only development networks
# export BUILD_TAGS=dev
- Build and install
livepeer
:
make
cp livepeer* /usr/local/bin
Troubleshooting
Error while loading shared libraries
You may encounter the following issue when running the livepeer
binary.
error while loading shared libraries: libnppig.so.11: cannot open shared object file: No such file or directory.
This means that you have installed the Livepeer GPU binary but it is unable to access your CUDA Toolkit libraries. If you do not intend to use GPU transcoding, please download livepeer
instead of livepeer-gpu
. However, if you wish to use GPU transcoding, please ensure that the CUDA Toolkit is installed and add its path to the shared libraries path.
export LD_LIBRARY_PATH="${HOME}/compiled/lib:/usr/local/cuda/lib64:${LD_LIBRARY_PATH}