How To Use Yaourt to Install AUR Packages on Arch Linux

AUR, which stands for Arch User Repository, is one of the best features of Arch Linux because it contains a large amount of software packages contributed by Arch Linux users. And Yaourt is a very easy and useful tool to install AUR package on Arch Linux.

In this tutorial, I will explain how easy it is to install the Yaourt package manager on Arch Linux and how to use yaourt to install packages from AUR repository step by step.

Install Yaourt Package Manager on Arch Linux

Open repository configuration file with root privilege.

sudo nano /etc/pacman.conf

Append the following lines at the end of this file. This will add the yaourt repo from repo.archlinux.fr. Repositories added by user manually are called custom repositories.

[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch

Save and close this file. Now update repository info and install Yaourt package manager plus a very import tool called fakeroot. This is for Yaourt to build Arch Linux package.

sudo pacman -Sy yaourt fakeroot

fakeroot has the ability to simulate superuser privileges in the build process so you don’t have to prefix yaourt command with sudo.

You may also want to install the base-devel package which contains tools that are used to compile packages like gcc, autoconf, automake etc.

sudo pacman -S base-devel

How to Use Yaourt

Yaourt can be used to install packages both from Official core, extra, community repository and the AUR repository. To use Yaourt, you just give it a keyword then it will perform a serach.

If I tell Yaourt to search ambiance for me.

yaourt ambiance

As you can see from the below screenshot, Yaourt had found 9 packages matching the keyword ambiance. All of them are in the AUR repo. It tells you how many votes each package has got and their popularity among Arch Linux users.

Install Yaourt and Use Yaourt to Install AUR Packages

You choose to install a package by typing the number of that package. I want to install the 3rd package so I type 3.

Then it will download the PKGBUILD script and ask you if you want to edit the build script. Normally you don’t need to edit build script.

Install Yaourt and Use Yaourt to Install AUR Packages

Next Yaourt checks package dependencies. After that, it ask you whether you want to continue building the Arch Linux package. Press Y to continue.

Install Yaourt and Use Yaourt to Install AUR Packages

Now it starts downloading source package.

Install Yaourt and Use Yaourt to Install AUR Packages

After it finished downloading source and making Arch packages, press Y to install this package to your Arch Linux OS.

Install Yaourt and Use Yaourt to Install AUR Packages

Finally, enter your password to install this package.

Note: It’s not recommended to prefix yaourt with sudo as the build process requires no root privileges. You only need sudo privilege in the final install step.

aurvote

Install aurvote to vote for your favourite AUR packages. This encourages package maintainers to keep their packages updated!

sudo pacman -S aurvote

Congrats! You just learned how to install Yaourt and use Yaourt to install AUR packages.

Rate this tutorial
[Total: 3 Average: 4.3]