要安装Yarn,我运行了以下命令:
sudo apt-key adv --keyserver pgp.mit.edu --recv D101F7899D41F3C3
echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
我安装了Node.js版本6.6.0,但我收到错误:
yarn : Depends: nodejs (>= 4.0.0) but 0.10.25~dfsg2-2ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.
答案 0 :(得分:2)
您需要Node.js 4.0或更高版本才能运行Yarn。 Ubuntu 14.04在其存储库中只有Node.js 0.10,所以你必须添加一个不同的存储库来获得更新版本的Node。按照此处列出的说明操作:https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions