2 Methods to Install Yaourt on Arch Linux

YAOURT is short for Yet Another User Repository Tool. It is a tool for automatization of AUR package installation. Such a tool is needed to easily install user repository packages in Arch Linux and systems based on it, such as Manjaro Linux or Antergos. In this article, I will show you how to install Yaourt on Arch Linux 2018.

Two Ways to Install

As Yaourt itself is an AUR package, meaning it's unsupported in pacman by default, we have two ways to install it.

One of them is building the package from AUR, the other is adding a custom repository and downloading it using pacman. We will explore both methods. Although they are different, they share a common step. First, we will need to update your repositories and packages

$ sudo pacman -Syu
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Now install the packages which we will help for yaourt.

$ sudo pacman -S --needed base-devel git wget yajl
:: There are 26 members in group base-devel:
:: Repository core
   1) autoconf  2) automake  3) binutils  4) bison  5) fakeroot  6) file
   7) findutils  8) flex  9) gawk  10) gcc  11) gettext  12) grep  13) groff
   14) gzip  15) libtool  16) m4  17) make  18) pacman  19) patch
   20) pkg-config  21) sed  22) sudo  23) systemd  24) texinfo  25) util-linux
   26) which

Enter a selection (default=all): 

Press Enter to make a default selection when asked by the prompt.

1) Building From the AUR

As with all AUR packages, the first thing you need to do is acquire the build files. An AUR only dependency - package-query, is needed.

$ cd /opt

Now clone the packages query

$ git clone https://aur.archlinux.org/package-query.git
Cloning into 'package-query'...
remote: Counting objects: 45, done.

Enter the packages directory

$ cd package-query

Install the package.

$ makepkg -si

Now clone the yaourt repo

$ git clone https://aur.archlinux.org/yaourt.git
Cloning into 'yaourt'...
remote: Counting objects: 26, done.

Do the same for the yaourt package itself:

# cd /opt/yaourt && makepkg -si
==> Making package: yaourt 1.9-1 (Sat Feb 3 03:36:28 WAT 2018)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...

That'd be all!

2) Installing Yaourt Using a Custom Repository

You must add a custom repository to your pacman repository list. So edit the pacman configuration file with your favourite text editor. We will use vim.

$ sudo vim nano /etc/pacman.conf

Add this piece of text at the bottom:

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

Save the file. Then, you can install the package:

$ sudo pacman -Sy yaourt
$ sudo pacman -Sy yaourt
:: Synchronizing package databases...
 archlinuxfr               12.1 KiB  80.6K/s 00:00 [######################] 100%
 core is up to date
 extra is up to date
 community is up to date
warning: yaourt-1.9-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) yaourt-1.9-1

Because I have already installed yaourt with the previous, you can see in my output that I have a warning message which tells me that yaourt is installed and up to date but it will try to reinstall.

How to Use yaourt (few examples)

Aside from using Yaourt to download and install AUR packages, you can use it as a pacman replacement and install any non-AUR package with it. Just type in:

$ yaourt -S htop
resolving dependencies...
looking for conflicting packages...

Packages (1) htop-2.0.2-2

Total Download Size:   0.07 MiB
Total Installed Size:  0.19 MiB

:: Proceed with installation? [Y/n] 

As you would with pacman. The -Sy, -Syu options work as normal to sync database, upgrade packages:

$ yaourt -Syu
:: Synchronizing package databases...
 archlinuxfr is up to date
 core is up to date
 extra is up to date
 community is up to date

in addition with --devel --aur options, it can search aur and devel (all packages based on dev version) upgrades:

$ yaourt -Syu --aur --devel
:: Synchronizing package databases...
 archlinuxfr is up to date
 core is up to date
 extra is up to date
 community is up to date
==> upgrading SVN/CVS/HG/GIT package

You can list all the packages available and choose the one to be installed

$ yaourt list
1 core/acl 2.2.52-4 [installed]
 Access control list utilities, libraries and headers
2 core/libmnl 1.0.4-1 [installed]
 Minimalistic user-space library oriented to Netlink developers.
3 core/libpsl 0.19.1-1 [installed]
.......
.......
643 aur/zmeventserver-git 20171227.b6a8eca-2 (0) (0.00)
 A WSS (Secure Web Sockets) based event notification server that broadcasts new events to any 
 authenticated listeners.
==> Enter n° of packages to be installed (e.g., 1 2 3 or 1-3)
==> ---------------------------------------------------------
==>

Let us know your comments on this article. Have a great day.

Alain Francois 12:05 am

About Alain Francois

IT Linux administrator passionate of free and open source software, I work on Linux Systems since some years on installations and deployments of certain solutions. I like to share my experiences with a wider audience by training and conferences.

Author's All Posts
Like to become part of Linoxide Team and contribute tips? Contact us here.

Comments

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

All comments are subject to moderation.