按照以下步骤循序执行:
sudo apt-get install yarn
执行完成后 查看版本 yarn -v
ERROR: There are no scenarios; must have at least one
如果出现上面的报错,执行下面命令。
sudo apt autoremove cmdtest -y
sudo apt autoremove yarn -y
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn
执行完成后 查看版本 yarn -v
看到版本号即为安装成功。