Linux新环境安装solana开发所需全部套件(持续更新)
Linux新环境安装solana开发所需全部套件(持续更新)
ps:适配WSL
rust rustc cargo:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
或者使用镜像
export RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
nvm/npm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.bashrc
nvm install --lts
yarn:
166 sudo apt install -y curl gnupg2167 curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -168 echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list169 sudo apt update170 sudo apt install -y yarn171 yarn -v
或者
npm install -g yarn
ts:
npm install -g typescripttsc --version
git:
sudo add-apt-repository ppa:git-core/ppa
sudo apt update
sudo apt upgrade git
anchor:
cargo install --git https://github.com/coral-xyz/anchor --tag v0.31.1 anchor-cli --locked --force
anchor --version
solana-cli:
官方:anza.xyz
版本:https://github.com/anza-xyz/agave/releases
sh -c "$(curl -sSfL https://release.anza.xyz/v3.0.4/install)"或者 稳定版
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"
agave-install update
路径在:【PATH=“/home/hp/.local/share/solana/install/active_release/bin:$PATH”】
spl-token-cli:
cargo install spl-token-cli