Ubuntu-Solidity环境搭建记录

//Check update before install

sudo apt update -y && apt upgrade -y

//Install essentials

sudo apt install -y build-essential cmake libboost-all-dev

//Clone from github

git clone --recursive https://github.com/ethereum/solidity.git
cd solidity
//external resources
./scripts/install_deps.sh
mkdir build
cd build

cmake .. && make

//vm usually has this problem

(C++ Compiler Error--->memory--->swap size)
(
mkdir swap
dd if=/dev/zero of=swapfile bs=1024 count=2048000 
mkswap -f swapfile
swapon swapfile
)
make install
//check whether successfully installing solidity
solc --version

你可能感兴趣的:(Practical)