Installing dependencies

By building and running a node directly from the source code, you can ensure that you get all the latest code updates.

The following instructions presume that you will be running your node on a Linux system and are using cabal. For more information, see the supported platforms page. You can run a node on any platform by using a virtual machine.

To build and run a node from source, you need the following packages and tools:

  • the Haskell platform and Haskell build-tool cabal
  • the version control system git
  • the gcc C-compiler
  • C++ support for gcc
  • developer libraries for the the arbitrary precision library gmp
  • developer libraries for the compression library zlib
  • developer libraries for systemd and ncurses

You can install these dependencies as follows:

For a CentOS/RHEL-based system:

sudo yum update -y
sudo yum install git gcc gmp-devel -y
sudo yum install zlib-devel systemd-devel ncurses-devel -y

For Debian/Ubuntu, use the following instead:

sudo apt-get update -y
sudo apt-get install build-essential pkg-config libffi-dev libgmp-dev libssl-dev libtinfo-dev libsystemd-dev zlib1g-dev make g++ tmux git jq wget libncursesw5 -y

If you are using a different flavor of Linux, you will need to use the package manager suitable for your platform, and the names of the packages you need to install might differ.

Downloading, unpacking, installing and updating Cabal:

wget https://downloads.haskell.org/~cabal/cabal-install-
tar -xf cabal-install-
rm cabal-install- cabal.sig
mkdir -p ~/.local/bin
mv cabal ~/.local/bin/

Downloading and installing GHC:

wget https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-x86_64-deb9-linux.tar.xz
tar -xf ghc-8.6.5-x86_64-deb9-linux.tar.xz
rm ghc-8.6.5-x86_64-deb9-linux.tar.xz
cd ghc-8.6.5
sudo yum install ncurses-compat-libs

Add ~/.cabal/bin/ and ~/.local/bin/ to the PATH

Then run:

cabal update

Building and running the node from source:

Use the installing from source instructions to build and run the node from source.

© IOHK 2015 - 2021

Cardano is an open-source project.

Cardano is a software platform ONLY and does not conduct any independent diligence on, or substantive review of, any blockchain asset, digital currency, cryptocurrency or associated funds. You are fully and solely responsible for evaluating your investments, for determining whether you will exchange blockchain assets based on your own judgement, and for all your decisions as to whether to exchange blockchain assets with Cardano. In many cases, blockchain assets you exchange on the basis of your research may not increase in value, and may decrease in value. Similarly, blockchain assets you exchange on the basis of your research may fall or rise in value after your exchange.

Past performance is not indicative of future results. Any investment in blockchain assets involves the risk of loss of part or all of your investment. The value of the blockchain assets you exchange is subject to market and other investment risks