ubuntu 安装yarn
时间: 2023-09-05 08:10:28 浏览: 117
在Ubuntu上安装yarn有几个步骤。您可以选择以下两种方法之一:
方法1:
1. 打开终端并输入以下命令以安装yarn的GPG密钥和存储库源:
```
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
```
2. 更新软件包列表:
```
sudo apt update
```
3. 安装yarn:
```
sudo apt install yarn
```
方法2:
1. 打开终端并输入以下命令以下载并运行安装脚本:
```
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
```
2. 安装Node.js:
```
sudo apt install -y nodejs
```
3. 安装yarn:
```
sudo npm install -g yarn
```
无论您选择哪种方法,都可以在Ubuntu上成功安装yarn。 <span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [Ubuntu:安装yarn](https://blog.csdn.net/cacique111/article/details/125953200)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [Ubuntu 如何正确安装yarn](https://blog.csdn.net/weixin_43787264/article/details/131331900)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文