-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall_prerequisites.sh
executable file
·38 lines (33 loc) · 1.16 KB
/
install_prerequisites.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#Install GETH
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt update
sudo apt install ethereum
sudo apt install -y puppeth
#Add PowerChain scipts to PATH
#All PowerChain scripts start with "pc_"
sudo chmod +x scripts/*
if grep -q "$(pwd)/scripts" ~/.bashrc; then
echo "PowerChain scripts already in PATH..."
else
echo "export PATH=$(pwd)/scripts:\$PATH" >> ~/.bashrc
export PATH=$(pwd)/scripts:$PATH
echo "Adding PowerChain scripts to PATH..."
fi
#Install Python
sudo apt install python3 python3-dev python3-pip
#Install Web3.py
python -m pip install cython cytoolz web3 py-solc-x
#Install node
sudo apt-get install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
NODE=16
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt-get update
sudo apt install nodejs gcc g++ make -y
sudo npm cache clean -f
sudo npm install -g n
sudo n 16
sudo apt-get install --reinstall nodejs-legacy
echo "- - - - -"
echo "Done..."