Yaourt 已死！在 Arch 上使用这些替代品
AUR Yaourt
**前略：Yaourt 曾是最流行的 AUR 助手，但现已停止开发。在这篇文章中，我们会为 Arch 衍生发行版们列出 Yaourt 最佳的替代品。**


[Arch User Repository](https://wiki.archlinux.org/index.php/Arch_User_Repository) （常被称作 AUR），是一个为 Arch 用户而生的社区驱动软件仓库。Debian/Ubuntu 用户的对应类比是 PPA。


AUR 包含了不直接被 [Arch Linux](https://www.archlinux.org/) 官方所背书的软件。如果有人想在 Arch 上发布软件或者包，它可以通过这个社区仓库提供。这让最终用户们可以使用到比默认仓库里更多的软件。


所以你该如何使用 AUR 呢？简单来说，你需要另外的工具以从 AUR 中安装软件。Arch 的包管理器 [pacman](https://wiki.archlinux.org/index.php/pacman) 不直接支持 AUR。那些支持 AUR 的“特殊工具”我们称之为 [AUR 助手](https://wiki.archlinux.org/index.php/AUR_helpers)。


Yaourt （Yet AnOther User Repository Tool）（曾经）是 `pacman` 的一个封装，便于用户在 Arch Linux 上安装 AUR 软件。它基本上采用和 `pacman` 一样的语法。Yaourt 对于 AUR 的搜索、安装，乃至冲突解决和包依赖关系维护都有着良好的支持。


然而，Yaourt 的开发进度近来十分缓慢，甚至在 Arch Wiki 上已经被[列为](https://wiki.archlinux.org/index.php/AUR_helpers#Comparison_table)“停止或有问题”。[许多 Arch 用户认为它不安全](https://www.reddit.com/r/archlinux/comments/4azqyb/whats_so_bad_with_yaourt/) 进而开始寻找其它的 AUR 助手。


![Yaourt 以外的 AUR Helpers](/data/attachment/album/201808/16/123706vsuasswnrdsudg41.jpg)


在这篇文章中，我们会介绍 Yaourt 最佳的替代品以便于你从 AUR 安装软件。


### 最好的 AUR 助手


我刻意忽略掉了例如 Trizen 和 Packer 这样的流行的选择，因为它们也被列为“停止或有问题”的了。


#### 1、 aurman


[aurman](https://github.com/polygamma/aurman) 是最好的 AUR 助手之一，也能胜任 Yaourt 替代品的地位。它有非常类似于 `pacman` 的语法，可以支持所有的 `pacman` 操作。你可以搜索 AUR、解决包依赖，在构建 AUR 包前检查 PKGBUILD 的内容等等。


aurman 的特性：


* aurman 支持所有 `pacman` 操作，并且引入了可靠的包依赖解决方案、冲突判定和<ruby> 分包 <rt>  split package </rt></ruby>支持
* 线程化的 sudo 循环会在后台运行，所以你每次安装只需要输入一次管理员密码
* 提供开发包支持，并且可以区分显性安装和隐性安装的包
* 支持搜索 AUR 包和仓库
* 在构建 AUR 包之前，你可以检视并编辑 PKGBUILD 的内容
* 可以用作单独的 [包依赖解决工具](https://github.com/polygamma/aurman/wiki/Using-aurman-as-dependency-solver)


安装 aurman：



```
git clone https://aur.archlinux.org/aurman.git
cd aurman
makepkg -si

```

使用 aurman：


用名字搜索：



```
aurman -Ss <package-name>

```

安装：



```
aurman -S &lt;package-name>

```

#### 2、 yay


[yay](https://github.com/Jguer/yay) 是下一个最好的 AUR 助手。它使用 Go 语言写成，宗旨是提供最少化用户输入的 `pacman` 界面、yaourt 式的搜索，而几乎没有任何依赖软件。


yay 的特性：


* `yay` 提供 AUR 表格补全，并且从 ABS 或 AUR 下载 PKGBUILD
* 支持收窄搜索，并且不需要引用 PKGBUILD 源
* `yay` 的二进制文件除了 `pacman` 以外别无依赖
* 提供先进的包依赖解决方案，以及在编译安装之后移除编译时的依赖
* 当在 `/etc/pacman.conf` 文件配置中启用了色彩时支持色彩输出
* `yay` 可被配置成只支持 AUR 或者 repo 里的软件包


安装 yay：


你可以从 `git` 克隆并编译安装。



```
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si

```

使用 yay：


搜索：



```
yay -Ss <package-name>

```

安装：



```
yay -S <package-name>

```

#### 3、 pakku


[Pakku](https://github.com/kitsunyan/pakku) 是另一个还处于开发早期的 pacman 封装，虽然它还处于开放早期，但这不说明它逊于其它任何 AUR 助手。Pakku 能很好地支持从 AUR 搜索和安装，并且也可以在安装后移除不必要的编译依赖。


pakku 的特性：


* 从 AUR 搜索和安装软件
* 检视不同构建之间的文件和变化
* 从官方仓库编译，并事后移除编译依赖
* 获取 PKGBUILD 以及 pacman 整合
* 类 pacman 的用户界面和选项支持
* 支持pacman 配置文件以及无需 PKGBUILD 源


安装 pakku：



```
git clone https://aur.archlinux.org/pakku.git
cd pakku
makepkg -si

```

使用 pakku：


搜索：



```
pakku -Ss spotify

```

安装：



```
pakku -S spotify

```

#### 4、 aurutils


[aurutils](https://github.com/AladW/aurutils) 本质上是一堆使用 AUR 的自动化脚本的集合。它可以搜索 AUR、检查更新，并且解决包依赖。


aurutils 的特性：


* aurutils 使用本地仓库以支持 pacman 文件，所有的包都支持 `–asdeps`
* 不同的任务可以有多个仓库
* `aursync -u` 一键同步本地代码库
* `aursearch` 搜索提供 pkgbase、长格式和 raw 支持
* 能忽略指定包


安装 aurutils：



```
git clone https://aur.archlinux.org/aurutils.git
cd aurutils
makepkg -si

```

使用 aurutils：


搜索：



```
aurutils -Ss <package-name>

```

安装：



```
aurutils -S <package-name>

```

所有这些包，在有 Yaourt 或者其它 AUR 助手的情况下都可以直接安装。


### 写在最后


Arch Linux 有着[很多 AUR 助手](https://wiki.archlinux.org/index.php/AUR_helpers) 可以自动完成 AUR 各方面的日常任务。很多用户依然使用 Yaourt 来完成 AUR 相关任务，每个人都有自己不一样的偏好，欢迎留言告诉我们你在 Arch 里使用什么，又有什么心得？




---


via: <https://itsfoss.com/best-aur-helpers/>


作者：[Ambarish Kumar](https://itsfoss.com/author/ambarish/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[Moelf](https://github.com/Moelf) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

Yaourt had been the most popular AUR helper, but it is not being developed anymore. In this article, we list out some of the best alternatives to Yaourt for Arch-based Linux distributions.

[Arch User Repository](https://itsfoss.com/aur-arch-linux/), popularly known as AUR, is the community-driven software repository for Arch users. Debian/Ubuntu users can think of AUR as the equivalent of PPA.

It contains packages that are not directly endorsed by [Arch Linux](https://www.archlinux.org/). If someone develops software or package for Arch Linux, it can be provided through this community repositories. This enables the end-user to access more software than they get by default.

So, how do you use AUR then? Well, you need a different tool to install software from AUR. Arch’s package manager [pacman](https://www.archlinux.org/pacman/) doesn’t support it directly. Hence, you need these ‘special tools’ called [AUR helpers](https://wiki.archlinux.org/index.php/AUR_helpers) to automate the usage of AUR packages.

Yaourt (Yet AnOther User Repository Tool) was a wrapper for Pacman that enabled installing AUR packages on Arch Linux. It uses the same syntax as Pacman.

Yaourt also supported Arch User Repository for searching, installing, conflict resolution, and dependency maintenance.

However, Yaourt is no longer a solution.

In this article, you will see the best Yaourt alternatives that you can use for installing software from AUR.

## 1. yay

yay is the next best AUR helper written in Go to provide an interface of Pacman with minimal user input, yaourt-like search, and almost no dependencies.

**Features of yay**

- Provides completions for AUR packages and downloads the PKGBUILD from ABS or AUR.
- Supports search narrowing and no sourcing of PKGBUILD.
- The binary has no additional dependencies than pacman.
- Provides advanced dependency solver and removes make dependencies at the end of the build process.
- Supports colored output when you enable the Color option in the /etc/pacman.conf file.
- It can be made to support only AUR packages or only repo packages.
- Un/Vote for packages

**Installing yay**

You can install yay by cloning the git repo and building it. Use the below command to install yay in Arch Linux :

```
sudo pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
```


**Using yay**

Use | Command |
---|---|

Searching an application | `yay -Ss <package-name>` |

Installing an application | `yay -S <package-name>` |

Present package-installation selection menu | `yay <package name>` |

Update system | `yay` because of the alias set to yay -Syu |


## 2. Paru

Paru is a feature-packed AUR helper, written in Rust language. It's been developed by one of the developers of yay AUR helper and both are under active development and maintenance. It [offers a lot of features](https://itsfoss.com/paru-aur-helper/) and minimal interaction.

**Features of Paru**

- Print the PKGBUILD File with syntax highlighting
- AUR comment support
- Local repo and chroot support
- Verbose search with
`-Sss`

- Flag to download AUR packages via SSH
- Option to keep older packages in the local repo
- Print news on upgrade
- Support for signing packages
- Interactively search for packages

**Installing Paru**

```
sudo pacman -S --needed base-devel
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si
```


**Using Paru**

Use | Command |
---|---|

To search for packages | `paru -Ss <package name>` |

To install a package | `paru -S <package name>` |

To interactively search for packages | `paru <package name>` |

Update your system | `paru` because of the alias set to paru -Syu |


## 3. Pakku

Pakku is another pacman wrapper. Although its original creator went busy with other projects, the package is maintained by [Pakku users and the Nim community](https://github.com/zqqw/pakku). It does its job pretty nicely, and searching and installing applications from AUR removes dependencies after a build.

**Features of pakku**

- Searching and installing packages from Arch User Repository.
- Viewing files and changes between builds.
- Building packages from official repositories and removing make dependencies after a build.
- PKGBUILD retrieving and Pacman integration.
- Pacman-like user interface and pacman options support.
- Pacman configuration supports and no PKGBUILD sourcing.

**Installing pakku**

```
git clone https://aur.archlinux.org/pakku.git
cd pakku
makepkg -si
```


**Using pakku**

Use | Command |
---|---|

Search for an application | `pakku -Ss <package name>` |

Install a package | `pakku -S <package name>` |

Only work with AUR packages | `pakku -Sz` |

Query all "dependency islands" | `pakku -Qdttt` |


## 4. aurutils

aurutils is basically a collection of scripts that automates the usage of the Arch User Repository. It can search AUR, check updates for different applications installed, and settle up dependencies issues.

**Features of aurutils**

- aurutils uses a local repository which gives it the benefit of pacman file support, and all packages work with –asdeps.
- There can be multiple repos for different tasks.
- Update local repository in one go with aursync -u.
- pkgbase, long format and raw support for aursearch.
- Ability to ignore package.

**Installing aurutils**

```
git clone https://aur.archlinux.org/aurutils.git
cd aurutils
makepkg -si
```


**Using aurutils**

Once installed aurutils, you need to configure it for use. You can find a detailed guide on [configuring aurutils here](https://gist.github.com/geosharma/afe1ea9ebe58cb67aaaba62a0d47bc7a).

Use | Commands |
---|---|

Download and build AUR package and place it in the custom repository | `aur sync <name>` |

Installing a package from AUR | use `sudo pacman -S <name>` to install downloaded aur package |

Update all installed AUR packages | `aur sync -u` |

List AUR packages | `aur pkglist` |


These packages can be installed directly if you are already using Yaourt or any other AUR helper.

## 5. Pamac

Pamac is a gtk frontend for [libalpm](https://www.archlinux.org/pacman/libalpm.3.html). It is the default package manager in Manjaro but you may also [install Pamac on Arch Linux](https://itsfoss.com/install-pamac-arch-linux/).

Pamac GUI allows to use packages from Snap, Flatpak and AUR. There is a CLI version as well and you can use it as an AUR helper.

**Features of Pamac**

- CLI package management with pamac-cli
- A GTK-3 GUI
- Library to access package infos and run transactions
- Flatpak and Snap support
- Tray appindicator which notifies you about updates

**Installing pamac**

```
git clone https://aur.archlinux.org/pamac-aur.git
cd pamac-aur
makepkg -si
```


**Using pamac**

Pamac can be used either through the terminal or the GUI. I'll go with the command line here.

Use | Command |
---|---|

Search for a package | `pamac search <package>` |

To install a package | `pamac install <package>` |

To uninstall a package | `pamac remove <package>` |

To display a list of all installed packages | `pamac list -i` |


For a detailed guide to pamac, you can refer to its [Manjaro Wiki page](https://wiki.manjaro.org/index.php?title=Pamac).

## 6. Trizen

Trizen is a lightweight wrapper for AUR, written in Perl. Yes, Perl is still being used, don't be too surprised.

**Features of Trizen**

- Search and install packages from AUR
- Reading AUR comments for packages
- Recursive resolve AUR dependencies
- Built-in interaction with 'pacman'
- Upgrade support for AUR packages

**Install Trizen**

```
git clone https://aur.archlinux.org/trizen.git
cd trizen
makepkg -si
```


**Using Trizen**

Use | Command |
---|---|

To search for packages | `trizen -Ss <package name>` |

To install a package | `trizen -S <package name>` |

To display AUR comments | `trizen -C <package name>` |

To remove a package | `trizen -R <package name>` |


## 7. Pikaur

Pikaur is an AUR helper written in python, with minimal dependencies. It allows you to review the PKGBUILD all at once and build them without user interaction.

Pikaur wraps all the pacman options accurately except for `-Syu`

which is being split into `-Sy`

(to refresh package list first) and `-Su`

(to install upgrades after the user confirmed the package list or altered it via Manual package selection).

**Features of Pikaur**

- Retrieve PKGBUILDs from AUR and ABS
- Build local PKGBUILDs with AUR deps
- Show unread
[Arch news](https://www.archlinux.org/news/)before sysupgrade - AUR package names in shell completion (bash, fish, zsh)
- Interactively handle common build problems (like untrusted GPG key or checksum mismatch, wrong architecture)

**Install Pikaur**

```
sudo pacman -S --needed base-devel git
git clone https://aur.archlinux.org/pikaur.git
cd pikaur
makepkg -fsri
```


**Using Pikaur**

Use | Command |
---|---|

To search for packages | `pikaur -Ss <package name>` |

To install a package | `pikaur -S <package name>` |

To display package info | `pikaur -Si <package name>` |

To upgrade system | `pikaur -Syu` |


**Which one to use?**

Arch Linux has some [more AUR helper](https://wiki.archlinux.org/index.php/AUR_helpers) that can automate specific tasks for the Arch User Repository.

To an average user like me, any AUR helper with a similar syntax as the [Pacman command](https://itsfoss.com/pacman-command/) is more than sufficient.

*💬 What do you think? Which AUR helper do you want to use? Share it in the comments, please.*