安装纱线Ubuntu 16.04 (Linux Mint 18.1)

时间:2021-03-13 23:41:29

I have a new installation of Linux Mint 18.1 with Ubuntu 16.04. I have installed Node 6.10.0.

我有一个新的安装Linux Mint 18.1与Ubuntu 16.04。我已经安装了节点6.10.0。

When doing the command that indicates the documentation of Yarn:

当执行指示纱线文档说明的命令时:

sudo apt-get update && sudo apt-get install yarn

It says "could not find yarn package"

上面写着“找不到纱线包装”

I must do something else, because in the documentation I do not see anything about it.

我必须做一些其他的事情,因为在文档中我看不到任何关于它的东西。

Thank you.

谢谢你!

安装纱线Ubuntu 16.04 (Linux Mint 18.1)

4 个解决方案

#1


89  

On Ubuntu Linux, you can install Yarn via Debian package repository. You will first need to configure the repository:

在Ubuntu Linux上,您可以通过Debian软件包存储库安装纱线。您首先需要配置存储库:

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

Then you can simply:

然后您可以简单地:

sudo apt-get update && sudo apt-get install yarn

More information here

更多的信息在这里

#2


5  

See on Installation | Yarn | Linux tab

参见安装|纱| Linux选项卡

There are instructions for several linux distributions

有几个linux发行版的说明

#3


3  

I was unable to install Yarn on Ubuntu 16.04 using the accepted answer but found it easy with npm:

我无法使用公认的答案在Ubuntu 16.04上安装纱线,但我发现使用npm很容易:

npm install -g yarn

npm安装- g纱

Then check install / version with

然后检查安装/版本

yarn --version

纱,版本

#4


1  

Here are more details about the official install instruction.

以下是有关正式安装指令的详细信息。

  1. apt-key command gets the public authentication key for software integration check.

    apt-key命令获取用于软件集成检查的公共认证密钥。

  2. deb https://dl.yarnpkg.com/debian/ stable main is the Ubuntu repository containing yarn. Look at OP's screenshot, the top 10 lines list existing repositories to search for packages, but there is no yarn's one. So we need to add the repository by creating file /etc/apt/sources.list.d/yarn.list.

    deb https://dl.yarnpkg.com/debian/ stable main是包含纱线的Ubuntu库。看看OP的屏幕截图,前10行列出了搜索包的现有存储库,但是没有纱线的存储库。因此,我们需要通过创建文件/etc/apt/sources.list.d/yarn.list来添加存储库。

  3. After the above two steps, issue apt/apt-get command to add yarn like usual Ubuntu packages.

    在以上两个步骤之后,发出apt/apt-get命令,像通常的Ubuntu包一样添加纱线。

#1


89  

On Ubuntu Linux, you can install Yarn via Debian package repository. You will first need to configure the repository:

在Ubuntu Linux上,您可以通过Debian软件包存储库安装纱线。您首先需要配置存储库:

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

Then you can simply:

然后您可以简单地:

sudo apt-get update && sudo apt-get install yarn

More information here

更多的信息在这里

#2


5  

See on Installation | Yarn | Linux tab

参见安装|纱| Linux选项卡

There are instructions for several linux distributions

有几个linux发行版的说明

#3


3  

I was unable to install Yarn on Ubuntu 16.04 using the accepted answer but found it easy with npm:

我无法使用公认的答案在Ubuntu 16.04上安装纱线,但我发现使用npm很容易:

npm install -g yarn

npm安装- g纱

Then check install / version with

然后检查安装/版本

yarn --version

纱,版本

#4


1  

Here are more details about the official install instruction.

以下是有关正式安装指令的详细信息。

  1. apt-key command gets the public authentication key for software integration check.

    apt-key命令获取用于软件集成检查的公共认证密钥。

  2. deb https://dl.yarnpkg.com/debian/ stable main is the Ubuntu repository containing yarn. Look at OP's screenshot, the top 10 lines list existing repositories to search for packages, but there is no yarn's one. So we need to add the repository by creating file /etc/apt/sources.list.d/yarn.list.

    deb https://dl.yarnpkg.com/debian/ stable main是包含纱线的Ubuntu库。看看OP的屏幕截图,前10行列出了搜索包的现有存储库,但是没有纱线的存储库。因此,我们需要通过创建文件/etc/apt/sources.list.d/yarn.list来添加存储库。

  3. After the above two steps, issue apt/apt-get command to add yarn like usual Ubuntu packages.

    在以上两个步骤之后,发出apt/apt-get命令,像通常的Ubuntu包一样添加纱线。