electrs: fix rust installation #2548

This commit is contained in:
openoms 2021-10-10 10:50:23 +01:00
parent 8d2ef3e361
commit 3a7409033b
No known key found for this signature in database
GPG key ID: 5BFB77609B081B65

View file

@ -268,12 +268,10 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
cd /home/electrs
echo
echo "# Installing Rust"
echo "# Installing Rust for the electrs user"
echo
# https://github.com/romanz/electrs/blob/master/doc/usage.md#build-dependencies
#sudo -u electrs curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sudo -u electrs sh -s -- --default-toolchain 1.39.0 -y
sudo apt update
sudo apt install -y cargo
sudo -u electrs curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sudo -u electrs sh -s -- --default-toolchain none -y
sudo apt install -y clang cmake build-essential # for building 'rust-rocksdb'
echo
@ -283,7 +281,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
cd /home/electrs/electrs || exit 1
sudo -u electrs git reset --hard $ELECTRSVERSION
sudo -u electrs cargo build --locked --release || exit 1
sudo -u electrs /home/electrs/.cargo/bin/cargo build --locked --release || exit 1
echo
echo "# The electrs database will be built in /mnt/hdd/app-storage/electrs/db. Takes ~18 hours and ~50Gb diskspace"