Compiling Cardano Node
After you finish installing GHC and Cabal successfully, you can compile Cardano Node from source code.
To compile Cardano Node:
In a terminal window on the computer hosting your block-producing node, type the following command to navigate to the working directory that you created in the procedure Installing Glasgow Haskell Compiler and Cabal:
To download Cardano Node source code, type:
To switch the repository that you downloaded to your local computer in step 2 to the latest tagged commit, type:
Typing a dollar sign ("$") before a command in parentheses refers to the output of the command in parentheses. For example, using a Web browser you can navigate to the above URL https://api.github.com/repos/input-output-hk/cardano-node/releases/latest to display the data that the curl
command retrieves, and then confirm the value of the tag_name
attribute that the jq
command selects.
To adjust the project configuration to disable optimization and set the recommended compiler version, type the following command where
<GHCVersionNumber>
is the GHC version that you set in the procedure Installing Glasgow Haskell Compiler and Cabal:
Using a text editor, open the file named
cabal.project.local
located in the current folder, and then add the following lines at the end of the file to avoid installing a custom libsodium library:
Save and close the
cabal.project.local
file.To produce executable
cardano-node
andcardano-cli
binaries, type:
Depending on your the processing power of your computer, the build process requires about 20 minutes to complete.
To copy the
cardano-node
andcardano-cli
binaries that you produced in step 7 into the/usr/local/bin
directory, type:
To confirm that the version installed on your computer matches the latest release available in the Cardano Node GitHub repository, type:
On each computer hosting a relay node for your stake pool, repeats steps 1 to 9
Last updated