美文网首页
yarn 安装失败 can't connect to the a

yarn 安装失败 can't connect to the a

作者: 黄同学2019 | 来源:发表于2020-06-06 16:59 被阅读0次

在 windows wsl ubuntu 中安装 yarn,按照官网操作结果失败了

官网教程:

yarn install for debian / ubuntu

报错:

can't connect to the agent: IPC connect call failed

解决办法:

sudo apt remove gpg

sudo apt install gnupg1

然后再执行:

# 
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 --version

最后,更新淘宝源:

yarn config get registry
# https://registry.yarnpkg.com

yarn config set registry https://registry.npm.taobao.org

yarn config get registry
# https://registry.npm.taobao.org

参考:Ubuntu20.04安装yarn报错gpg: can't connect to the agent: IPC connect call failed(已解决)

相关文章

网友评论

      本文标题:yarn 安装失败 can't connect to the a

      本文链接:https://www.haomeiwen.com/subject/yaxftktx.html