rust and cardano-cli on a RockPi4
Note: this guide is written in early 2019 for Debian Stretch.
Add the following two lines to /etc/bash.bashrc
1
2 export RUSTUP_USE_HYPER=1
export PATH="$HOME/.cargo/bin":$PATH
install the following packages
1 sudo apt-get install curl linux-compiler-gcc-9-arm llvm clang-4.0 git build-essential
Now download the Rust installation package from www.rust-lang.org
You need the link for the latest stable release arm-unknown-
By assuming the version is 1.33.0 use
1
2
3
4
5
6
7
8 cd /tmp
curl https://static.rust-lang.org/dist/rust-1.33.0-arm-unknown-linux-gnueabihf.tar.gz > rust-install-tmp.tar.gz
tar -xvzf rust-install-tmp.tar.gz
rm rust-install-tmp.tar.gz
cd rust-1.33.0-arm-unknown-linux-gnueabihf
sudo ./install.sh
cd ..
rm -r rust-1.33.0-arm-unknown-linux-gnueabihf
Now let’s clone cardano-cli from input-output-hk project repository and build & install the binaries
1
2
3
4 cd ~
git clone https://github.com/input-output-hk/cardano-cli.git --recursive
cd cardano-cli
cargo install
the build process take some time (on a RackPi4 it was ~13 minutes)
At the end when cargo confirms a successful build (ignore the warnings) add the new build binary path to your PATH variable.
1
2 cd ~
nano .bashrc
add at the end of the file
1 export PATH="/home/linaro/.cargo/bin":$PATH
Now you should be able to use the cardano command line interface on your RockPi4
1
2
3
4
5
6 cardano-cli blockchain new mainnet
cardano-cli blockchain pull mainnet
cardano-cli wallet create "Test wallet"
cardano-cli wallet attach "Test wallet" mainnet
cardano-cli wallet sync "Test wallet"
cardano-cli wallet status "Test wallet"