How to Install Yaourt and Use it to Install packages in Arch Linux

Yaourt is a user repository tool. An acronym for Yet An Other User Repository Tool. Today we are going to install yaourt arch Linux. Yaourt is a frontend Pacman with more features and AUR support.It includes easy access to the Arch User Repository. Yaourt allows the user to automate package compilation and installation from the thousands of PKGBUILDs available in the Arch User Repository. It also completely supports the many thousands of Arch Linux binary packages.

In addition, everyone always liked yaourt for its ability to install repository and AUR packages alike.  So with the same command that uses the same syntax as Pacman. Having tried several another AUR helper still find it the most convenient one. But sourcing a bash script before reading it is just plain careless.

Here is the easy way to install Yaourt Arch Linux:

How to Install Yaourt arch linux Using Arch User Repository

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

Before installing Yaourt, first of all, we must have to install the necessary dependencies.

First: Dependencies

Open your terminal and type:
# sudo pacman -S --needed base-devel git wget yajl
You will get output like this as a result: just enter for default selection.

Second: Getting package-query

After finishing above step, we have to install package-query that allows to build and run Yaourt. For this We have to use ‘git clone’:
# git clone https://aur.archlinux.org/package-query.git
This will start cloning the repository on to your PC.
Cloning into 'package-query'...
remote: Counting objects: 24, done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 24 (delta 10), reused 13 (delta 0)
Unpacking objects: 100% (24/24), done.
Checking connectivity... done.

Third: Installing package-query

Then we have to go to the package-query directory and compile and install it as shown below.
# cd package-query
# makepkg -si

In your terminal, you will get the output:
Making package: package-query 1.8-1 (Wed Mar 9 14:37:20 IST 2016)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Downloading package-query-1.8.tar.gz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 386k 100 386k 0 0 41212 0 0:00:09 0:00:09 --:--:-- 27295
==> Validating source files with sha256sums...
package-query-1.8.tar.gz ... Passed
==> Extracting sources...
-> Extracting package-query-1.8.tar.gz with bsdtar
==> Starting build()...
[...]
Packages (1) package-query-1.8-1
Total Installed Size: 0.09 MiB
:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring [######################] 100%
(1/1) checking package integrity [######################] 100%
(1/1) loading package files [######################] 100%
(1/1) checking for file conflicts [######################] 100%
(1/1) checking available disk space [######################] 100%
:: Processing package changes...
(1/1) installing package-query [######################] 100%

Package-query has been installed.

Now, you can exit from the package-query directory using the command:
# cd ..
Now, you must git clone the latest Yaourt repository :
# git clone https://aur.archlinux.org/yaourt.git
Cloning into 'yaourt'...
remote:
Counting objects: 22, done.
remote:
Compressing objects: 100% (19/19), done.
remote:
Total 22 (delta 8), reused 17 (delta 3)
Unpacking objects: 100% (22/22), done.
Checking connectivity... done.

Then, go to the Yaourt directory and compile and install it as shown below.
# cd yaourt/
# makepkg -si

==> Making package: yaourt 1.8.1-1 (Wed Mar 9 14:41:33 IST 2016)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Downloading yaourt-1.8.1.tar.xz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 595 0 595 0 0 447 0 --:--:-- 0:00:01 --:--:-- 447
100 102k 100 102k 0 0 28640 0 0:00:03 0:00:03 --:--:-- 85032
==> Validating source files with sha256sums...
[...]
Packages (1) yaourt-1.8.1-1
Total Installed Size: 0.77 MiB
:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring [######################] 100%
(1/1) checking package integrity [######################] 100%
(1/1) loading package files [######################] 100%
(1/1) checking for file conflicts [######################] 100%
(1/1) checking available disk space [######################] 100%
:: Processing package changes...
(1/1) installing yaourt [######################] 100%
Optional dependencies for yaourt
aurvote: vote for favorite packages from AUR
customizepkg: automatically modify PKGBUILD during install/upgrade
rsync: retrieve PKGBUILD from official repositories

That’s it. Yaourt has been installed.

Finally, exit from the Yaourt repository and delete both cloned repositories if you would like to use below commands:
# cd ..
sudo rm -dR yaourt/ package-query/

It’s the end of the install yaourt in arch linux.

How to Use Yaourt

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

Typical yaourt use starts with passing it the desired keyword. Yaourt will look for both package names and descriptions.
yaourt <keyword>
When you perform a search, yaourt lists for each matching package:

  • description
  • version number
  • whether the package is installed
  • votes on the package

If an installed package is older than the one in the AUR, it will be highlighted. This can be helpful for tracking down packages that are breaking your system.

When you pick a package from the list, yaourt shows the latest comments and asks if you would like to edit the PKGBUILD. This allows you to edit the package in place if something is wrong with it. If someone has posted a fix in the comments, you can make the changes to the PKGBUILD before yaourt runs it through make PKG.

In addition to search, yaourt supports other standard package management operations.

Install or update a package
yaourt - S:
Synchronize the Pacman package database
yaourt - Sy:
Remove a package
yaourt - R:
Get the PKGBUILD for a package
yaourt - G:
show how much space packages are using
yaourt --stats::

It has an export option for storing packages after they have been built.
yaourt -Sb --export <destination dir> <package>
This could be used for making binary backups of critical packages. If you want to build and archive the package without installing it, just say no at the installation step. Since yaourt is an interactive tool, you will likely want to find something else if you need to automate this process.

Leave a Comment

Your email address will not be published. Required fields are marked *

Share via
Copy link