solana官方安装文档链接:https://solana.com/zh/docs/intro/installation/dependencies(支持中文,没那么完善)anchor官方安装文档链接:https://www.anchor-lang.com/docs/installationfi
solana官方安装文档链接:https://solana.com/zh/docs/intro/installation/dependencies (支持中文,没那么完善) anchor官方安装文档链接:https://www.anchor-lang.com/docs/installation#fish (相对完善,英文)
整体要求:魔法,需要基本的linux shell操作,vs code,前端环境安装。 主要流程:
开始中直接搜索ubuntu,打开ubuntu,ubuntu不支持复制粘贴问题:打开一下 terminal(cmd),然后重先进入ubnutu窗口就可以了。
执行官方提供的一键脚本:
curl --proto '=https' --tlsv1.2 -sSfL https://solana-install.solana.workers.dev | bash
如果失败就一步一步来,先安装rust,再安装 solana CLI,再安装Aanchor CLI。注意安装时用户需要选择shell默认登录的用户,不要用root执行,环境依赖会安装到用户目录下面,请保持所有命令执行用户一致
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"
有一个anchor AVM 管理器,类似node 的nvm管理器。 安装管理器
cargo install --git https://github.com/coral-xyz/anchor avm --force
安装最新版本Anchor CLI
avm install latest
avm use latest
这块Anchor默认采用ts进行测试,当然也支持rust进行测试。 node基于nvm安装 。
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
nvm install node
npm install --global yarn
下一篇文章会介绍如何运行第一个程序
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!