diff --git a/sources/tech/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md b/sources/tech/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md deleted file mode 100644 index 550ac3f9e4..0000000000 --- a/sources/tech/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md +++ /dev/null @@ -1,140 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What is Arch User Repository (AUR)? How to Use AUR on Arch and Manjaro Linux?) -[#]: via: (https://itsfoss.com/aur-arch-linux/) -[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) - -What is Arch User Repository (AUR)? How to Use AUR on Arch and Manjaro Linux? -====== - -If you have been using [Arch Linux][1] or other distribution based on Arch such as Manjaro, you might have comes across the term AUR. You try to install a new software and someone suggests to install it from AUR. This leaves you confused. - -What is this AUR? Why is it used? How to use AUR? I’ll answer these questions in this article. - -### What is AUR? - -![][2] - -AUR stands for Arch User Repository. It is a community-driven repository for Arch-based Linux distributions users. It contains package descriptions named [PKGBUILDs][3] that allow you to compile a package from source with [makepkg][4] and then install it via [pacman][5] (package manager in Arch Linux). - -The AUR was created to organize and share new packages from the community and to help accelerate popular packages’ inclusion into the [community repository][6]. - -A good number of new packages that enter the official repositories start in the AUR. In the AUR, users are able to contribute their own package builds (PKGBUILD and related files). - -The AUR community has the ability to vote for packages in the AUR. If a package becomes popular enough — provided it has a compatible license and good packaging technique — it may be entered into the community repository directly accessible by pacman. - -In short, AUR is the way for developers to make new software available to Arch Linux users before the software is officially included in Arch repositories. - -### Should you use AUR? What’s the risk involved? - -Using the AUR is like crossing the street. If you proceed with caution you should be fine. - -If you are new to Linux it is advised to not to use the AUR until you build a foundation knowledge about Arch/Manjaro and Linux in general. - -It is true that anyone can upload packages to the AUR but the [Trusted Users][7] (TUs) are charged with keeping an eye on what gets uploaded. Although TUs perform quality control to the uploaded packages, there is in no guarantee that packages in the AUR are well formed or not malicious. - -In practice the AUR seems to be quite safe but in theory it can do some damage, but only if you are not careful. A smart Arch user, **always** inspects PKGBUILDs and *.install files when building packages from the AUR. - -Additionally TUs (Trusted Users) also remove packages in the AUR that are included in core/extra/community so there should be no naming conflicts between them. The AUR will often contain developmental versions of packages (cvs/svn/git/etc) but they will have modified names such as foo-git. - -As for the AUR packages, pacman handles dependency resolution and detects file conflicts so you never have to worry about overwriting files in one package with files from another package unless you use the “–force” option by default. If you do that, you probably have more serious problems than file conflicts. - -### How to use AUR? - -The simplest way to use AUR is through a AUR helper. An [AUR helper][8] is a command line tool (some has GUI as well) that lets you search for packages published on the AUR and install them. - -##### Installing an AUR helper on Arch Linux - -Let’s say you want to use [Yay AUR helper][9]. Make sure that you have git installed on Linux. And then clone the repository, go to the directory and build the package. - -Use these commands one by one for that: - -``` -sudo pacman -S git -sudo git clone https://aur.archlinux.org/yay-git.git -cd yay -makepkg -si -``` - -Once installed, you can use yay command like this to install a package: - -``` -yay -S package_name -``` - -It’s not that you must use AUR helper for installing packages from AUR. Expand the next section to see how to use AUR without AUR helper. - -##### Installing AUR packages without AUR helpers - -If you don’t want to use AUR helper, you can install packages from AUR on your own as well. - -As soon as you find the package you want to install on [AUR page][10] it is advised to confirm “Licence”, “Popularity”, “Last Updated”, “Dependencies” and so on as an extra quality control step. - -``` -git clone [package URL] -cd [package name] -makepkg -si -``` - -For example. let’s say you want to install [telegram desktop package][11]: - -``` -git clone https://aur.archlinux.org/telegram-desktop-git.git -cd telegram-desktop-git -makepkg -si -``` - -#### Enabling AUR support in Manjaro Linux - -AUR isn’t enabled by default and you have to enable it through pamac. My laptop runs [Manjaro][12] Cinnamon but the steps are same for all Manjaro flavors. - -Open Pamac (listed as Add/Remove Software): - -![][13] - -Once you are in pamac go to preferences like shown below. - -![][14] - -In preferences dialog box go to AUR tab, enable the AUR support, enable check for updates and close the dialog box. - -![][15] - -You can now search for packages and those which belong to AUR can be identified by the tag under the package descriptions. - -![][16] - -I hope you find this article useful and keep an eye on social media for upcoming Arch related topics. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/aur-arch-linux/ - -作者:[Dimitrios Savvopoulos][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/dimitrios/ -[b]: https://github.com/lujun9972 -[1]: https://www.archlinux.org/ -[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/what-is-aur.png?ssl=1 -[3]: https://wiki.archlinux.org/index.php/PKGBUILD -[4]: https://wiki.archlinux.org/index.php/Makepkg -[5]: https://wiki.archlinux.org/index.php/Pacman#Additional_commands -[6]: https://wiki.archlinux.org/index.php/Community_repository -[7]: https://wiki.archlinux.org/index.php/Trusted_Users -[8]: https://itsfoss.com/best-aur-helpers/ -[9]: https://github.com/Jguer/yay -[10]: https://aur.archlinux.org/ -[11]: https://aur.archlinux.org/packages/telegram-desktop-git -[12]: https://manjaro.org/ -[13]: https://i1.wp.com/i.imgur.com/kFF6HtW.png?ssl=1 -[14]: https://i0.wp.com/i.imgur.com/47r963A.png?ssl=1 -[15]: https://i1.wp.com/i.imgur.com/UThiDHO.png?ssl=1 -[16]: https://i2.wp.com/i.imgur.com/RM5BKi2.png?ssl=1 diff --git a/translated/tech/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md b/translated/tech/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md new file mode 100644 index 0000000000..5a44bc4fef --- /dev/null +++ b/translated/tech/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md @@ -0,0 +1,140 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What is Arch User Repository (AUR)? How to Use AUR on Arch and Manjaro Linux?) +[#]: via: (https://itsfoss.com/aur-arch-linux/) +[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) + +什么是 Arch 用户仓库(AUR)?如何在 Arch 和 Manjaro Linux 上使用 AUR? +====== + +如果你一直在使用 [Arch Linux][1] 或其他基于 Arch 的发行版,如 Manjaro,那么可能会遇到 AUR。你尝试安装新软件,有人建议从 AUR 中安装它。这让你感到困惑。 + +什么是 AUR?为什么使用它?如何使用 AUR?我将在本文中回答这些问题。 + +### 什么是 AUR? + +![][2] + +AUR 表示 Arch 用户仓库 (Arch User Repository)。它是针对基于 Arch 的 Linux 发行版用户的社区驱动的仓库。它包含名为 [PKGBUILDs][3] 的包描述,它可让你使用 [makepkg][4] 从源代码编译软件包,然后通过 [pacman][5](Arch Linux 中的软件包管理器)安装。 + +创建 AUR 的目的是组织和共享社区中的新软件包,并帮助加速将流行的软件包纳入[社区仓库][6]。 + +进入官方仓库的大量新软件包都从 AUR 开始。在 AUR 中,用户可以贡献自己的软件包构建(PKGBUILD 和相关文件)。 + +AUR 社区可以对 AUR 中的软件包进行投票。如果一个软件包变得足够流行(假设它具有兼容的许可证和良好的打包技术),那么可以将其加入 pacman 直接访问的社区仓库中。 + +简而言之,AUR 是开发人员在 Arch 仓库中正式包含新软件之前向 Arch Linux 用户提供新软件的一种方式。 + +### 你应该使用 AUR 吗?有什么风险? + +使用 AUR 就像过马路一样。如果你谨慎操作,应该就没问题。 + +如果你刚接触 Linux,建议你在建立有关 Arch/Manjaro 和 Linux 的基础知识之前不要使用 AUR。 + +的确,任何人都可以将软件包上传到 AUR,但[受信任用户][7] (TU) 负责监视上传的内容。尽管 TU 对上传的软件包执行质量控制,但不能保证 AUR 中的软件包格式正确或没有恶意。 + +在实践中,AUR 似乎很安全,但理论上讲它可以造成一定程度的损害,但前提是你不小心。从 AUR 构建软件包时,聪明的 Arch 用户**总是**检查 PKGBUILD 和 *.install 文件。 + +此外,TU(受信任用户)还删除了 AUR 中包含在 core/extra/community 中的软件包,因此它们之间不应存在命名冲突。AUR 通常会包含软件包的开发版本 (cvs/svn/git 等),但它们的名称会被修改,例如 foo-git。 + +对于 AUR软 件包,pacman 会处理依赖关系并检测文件冲突,因此,除非你默认使用 “–force” 选项,否则你不必担心用另一个包中的文件会覆盖另一个包的文件。如果这么做了,你可能会遇到比文件冲突更严重的问题。 + +### 如何使用 AUR? + +使用 AUR 的最简单方法是通过 AUR helper。 [AUR helper][8] 是一个命令行工具(有些还有 GUI),可让你搜索在 AUR 上发布的软件包并安装。 + +##### 在 Arch Linux 上安装 AUR helper + +假设你要使用 [Yay AUR helper][9]。确保在 Linux 上安装了 git。然后克隆仓库,进入目录并构建软件包。 + +依次使用以下命令: + +``` +sudo pacman -S git +sudo git clone https://aur.archlinux.org/yay-git.git +cd yay +makepkg -si +``` + +安装后,你可以使用 yay 命令来安装软件包: + +``` +yay -S package_name +``` + +并非必须使用 AUR helper 来从 AUR 安装软件包。从以下文章解如何在没有 AUR helper 的情况下使用 AUR。 + +##### 不使用 AUR helper 安装 AUR 软件包 + +如果你不想使用 AUR helper,那么也可以自行从 AUR 安装软件包。 + +在 [AUR 页面][10]上找到要安装的软件包后,建议确认“许可证”、“流行程度”、“最新更新”、“依赖项”等,作为额外的质量控制步骤。 + +``` +git clone [package URL] +cd [package name] +makepkg -si +``` + +例如。假设你要安装 [telegram 桌面包][11]: + +``` +git clone https://aur.archlinux.org/telegram-desktop-git.git +cd telegram-desktop-git +makepkg -si +``` + +#### 在 Manjaro Linux 中启用 AUR 支持 + +它默认情况下未启用 AUR,你必须通过 pamac 启用它。我的笔记本电脑运行 [Manjaro][12] Cinnamon,但是所有 Manjaro 变种的步骤都相同。 + +打开 Pamac(列为 “Add/Remove Software”): + +![][13] + +进入 pamac 后,请进入如下所示的首选项。 + +![][14] + +在首选项对话框中,进入 AUR 选项卡,启用 AUR 支持,启用检查更新并关闭对话框。 + +![][15] + +现在,你可以搜索软件包,并且可以通过软件包描述下的标签来识别属于 AUR 的软件包。 + +![][16] + +希望本文对你有用,并关注社交媒体上即将出现的与 Arch 相关的主题。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/aur-arch-linux/ + +作者:[Dimitrios Savvopoulos][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/dimitrios/ +[b]: https://github.com/lujun9972 +[1]: https://www.archlinux.org/ +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/what-is-aur.png?ssl=1 +[3]: https://wiki.archlinux.org/index.php/PKGBUILD +[4]: https://wiki.archlinux.org/index.php/Makepkg +[5]: https://wiki.archlinux.org/index.php/Pacman#Additional_commands +[6]: https://wiki.archlinux.org/index.php/Community_repository +[7]: https://wiki.archlinux.org/index.php/Trusted_Users +[8]: https://itsfoss.com/best-aur-helpers/ +[9]: https://github.com/Jguer/yay +[10]: https://aur.archlinux.org/ +[11]: https://aur.archlinux.org/packages/telegram-desktop-git +[12]: https://manjaro.org/ +[13]: https://i1.wp.com/i.imgur.com/kFF6HtW.png?ssl=1 +[14]: https://i0.wp.com/i.imgur.com/47r963A.png?ssl=1 +[15]: https://i1.wp.com/i.imgur.com/UThiDHO.png?ssl=1 +[16]: https://i2.wp.com/i.imgur.com/RM5BKi2.png?ssl=1