archlinux AUR, yay

yay

https://github.com/Jguer/yay

yay 是一个 AUR 助手。它使用 Go 语言写成, 宗旨是提供最少化用户输入的 pacman 界面、yaourt 式的搜索, 而几乎没有任何依赖软件。

yay 安装

1
2
3
4
pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
1
pacman -S --needed git base-devel && git clone https://aur.archlinux.org/yay.git && cd yay && makepkg -si

Binary

If you do not want to compile yay yourself you can use the builds generated by GitHub Actions.

1
2
3
4
pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay-bin.git
cd yay-bin
makepkg -si

download binary

https://github.com/Jguer/yay/releases

AUR mirror

默认的仓库 (aur.archlinux.org) 非常慢, 可以走梯子加速, 或者用国内的镜像 执行以下命令修改 aururl :

1
2
yay --aururl "https://aur.tuna.tsinghua.edu.cn" --save
yay --aururl "https://aur.archlinux.org" --save

修改的配置文件位于 ~/.config/yay/config.json, 可以通过以下命令查看修改过的配置

1
yay -P -g

使用 命令

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# 搜索: 
yay -Ss <package-name>

# 安装: 
yay -S <package-name>

# 查看 yay 安装的软件包列表
yay -Q

# 查询软件包安装的文件列表
yay -Ql
yay -Ql <package-name>

Yaourt

Yaourt 已经不再维护

https://mirrors.tuna.tsinghua.edu.cn/help/AUR/
http://bashell.nodemedia.cn/archives/install-yaourt.html
https://linux.cn/article-9925-1.html