electrs: fix rust installation #2548

This commit is contained in:
openoms
2021-10-10 10:50:23 +01:00
parent 8d2ef3e361
commit 3a7409033b

View File

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