Arch Linux install yaourt How To

1. Install Yaourt using a custom repository
Edit Pacman configuration file:

$ sudo nano /etc/pacman.conf
Add the following repository at the bottom:

[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch
Save and close the file.

Now, update repository database and install Yaourt using command:

$ sudo pacman -Sy yaourt
That’s it. Yaourt has been installed. You can now skip the next section and directly go to the Usage section at the end of this tutorial to know how to use Yaourt wrapper tool.

Or If you want to know how to install Yaourt using AUR, read on.

2. Install Yaourt using AUR
Before installing Yaourt, we need to install the necessary dependencies. To do so, run:

$ sudo pacman -S –needed base-devel git wget yajl
Just ENTER to select default selection:

After installing necessary dependencies, we have to install package-query that allows to build and run Yaourt.

To do so, GIT clone to package-query repository as shown below:

$ git clone https://aur.archlinux.org/package-query.git
Sample output:

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.
Then, go to the package-query directory and compile and install it as shown below.

$ cd package-query/
$ makepkg -si
Sample 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, exit from the package-query directory using command:

$ cd ..
Git clone to the latest Yaourt repository :

$ git clone https://aur.archlinux.org/yaourt.git
Sample output:

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
Sample output:

==> 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. You can install aurvote to vote for favorite packages from AUR.

Finally, exit from the Yaourt repository and delete both cloned repositories using commands:

$ cd ..
$ sudo rm -dR yaourt/ package-query/
Usage
Yaourt usage is mostly same as pacman.

The typical Yaourt syntax is:

$ yaourt [options] [packages]
$ yaourt
Let us see few examples.

To update Arch Linux system, run:

$ yaourt -Syu
To install a package, run:

$ yaourt -S To upgrade/add packages:

$ yaourt -U To remove a package:

$ yaourt -R To build package from PKGBUILD found in a local directory:

$ yaourt -P
To show the stats of the packages:

$ yaourt –stats
For more details, check the man pages:

$ man yaourt
Recommended Read: How To Install Packer In Arch Linux

That’s all for now. I will be here soon with an another article. Until then stay tuned with OSTechNix.

If you find this tutorial useful, please share it to your social networks and support us.

Cheers!