DEV Community

Mario García
Mario García

Posted on • Edited on

8 1

Installing yay on Arch Linux

Yay is an AUR helper that you can use as a replacement for yaourt (deprecated). It's not available in the Arch Linux repositories. So If you recently installed Arch, you can follow the instructions in the GitHub repository.

Installation

First of all, you need to clone the PKGBUILD and run makepkg script for building the package.

Requirements

Git is a dependency of yay and installations from AUR are made through a fakeroot environment, so you need to install both packages. On a new Arch installation, Git and fakeroot are not installed by default, and you also need git to clone the PKGBUILD from AUR.

For using makepkg, its dependencies need to be installed. You can install the base-devel package group which includes binutills, make, gcc, fakeroot or install them individually.

Git:

$ sudo pacman -S git
Enter fullscreen mode Exit fullscreen mode

base-devel:

$ sudo pacman -S base-devel
Enter fullscreen mode Exit fullscreen mode

OR

binutils, make, gcc, fakeroot:

$ sudo pacman -S binutils make gcc fakeroot
Enter fullscreen mode Exit fullscreen mode

Install yay

$ git clone https://aur.archlinux.org/yay.git
$ cd yay
$ makepkg -si
Enter fullscreen mode Exit fullscreen mode

Yay is installed and you can get packages directly from AUR using this helper.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (3)

Collapse
 
cromatikap profile image
cromatikap

Not anymore, I'm doing a fresh install and sudo pacman -S yay says error: target not found

The only way is to git clone nowaday

Collapse
 
mattdark profile image
Mario García

Thank you so much for sharing

Collapse
 
zaphnath7 profile image
Edmond CH

Please,any help. I can't install yay on Arch Linux on PS4. #makepkg -si
''file /var/cache/pacman/pkg/go-2:1.17.8-1-×86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature))"

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay