Home Arch Linux How To Install Yaourt In Arch Linux

How To Install Yaourt In Arch Linux

By sk
Published: Last Updated on 19.8K views

Important Update:

Unfortunately, Yaourt is out dated and discontinued. So I strongly recommend you to use Yay AUR helper or Paru AUR helper instead.


Unlike most other Linux distributions, one main advantage of using Arch Linux is the users can add and install their favorite packages in a community repository called Arch User Repository or simply AUR. This repository is purely community-driven repository for Arch users, and it contains approximately 44,000+ packages. However, the AUR packages can't be installed using the standard package manager pacman. We have to manually download, check, and install AUR packages. This is where Yaourt comes in handy. Yaourt, stands for Yet AnOther User Repository Tool, is a package wrapper that can be used to easily install packages from AUR. In simple terms, Yaourt is a frontend of Pacman with more features and AUR support. In this tutorial, let me show you how to install Yaourt in Arch Linux.

Install Yaourt In Arch Linux

We can install Yaourt in two methods.

  1. Install Yaourt using a custom repository;
  2. Install Yaourt from source.

The former is relatively easy compared to the latter.

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 -S 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.

2. Install Yaourt from source

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/

Yaourt Usage

Yaourt usage is mostly same as Pacman.

The typical Yaourt syntax is:

$ yaourt <operation> [options] [packages]
$ yaourt <search pattern|package file>

Let us see few examples.

To update Arch Linux system, run:

$ yaourt -Syu

To install a package, run:

$ yaourt -S <package-name>

To upgrade/add packages:

$ yaourt -U <package>

To remove a package:

$ yaourt -R <package-name>

To build package from PKGBUILD found in a local directory:

$ yaourt -P <directory>

To show the stats of the packages:

$ yaourt --stats

For more details, check the man pages:

$ man yaourt

Suggested Read:


You May Also Like

10 comments

E3D3 . July 6, 2016 - 1:46 am

Thank you for sharing. This nice article was helpfull for a quick result. The good Arch Wiki is for when I have more time.

Reply
Thamaraiselvam October 14, 2016 - 8:02 am

Good article for newbies

Reply
Gabo November 7, 2016 - 12:14 pm

Thanks! 🙂

Reply
herialtifa September 13, 2017 - 9:05 am

Thank’s very usefull acticle

Reply
Victor Paiva Torres December 28, 2017 - 7:23 pm

When using a custom repository, you may need to replace $arch with your current archtecture (i.e. x86_64 or arm).

Reply
Mauricio January 19, 2018 - 4:19 am

Thanks for the tip. Excellent article.

Reply
sayyid maulana June 24, 2018 - 9:15 pm

==> ERROR: Running makepkg as root is not allowed as it can cause permanent,
catastrophic damage to your system.

==> ERROR: An unknown error has occurred. Exiting…

i found this trouble, i dont understand.

Reply
sk June 25, 2018 - 1:44 pm

Please don’t use Yaourt. It is out dated and discontinued. Use Yay AUR helper instead. https://ostechnix.com/yay-found-yet-another-reliable-aur-helper/

Reply
Froyd May 19, 2019 - 9:41 am

AUR method work !!!

Reply
Eliot June 24, 2019 - 4:31 am

Thanks… help me a lot!

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More