Important Update:
Unfortunately, Yaourt is out dated and discontinued. So I strongly recommend you to use Yay AUR helper or Paru AUR helper instead.
- How To Install Yay AUR Helper In Arch Linux, EndeavourOS, Manjaro Linux
- How To Install Paru AUR Helper In Arch Linux
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.
Table of Contents
Install Yaourt In Arch Linux
We can install Yaourt in two methods.
- Install Yaourt using a custom repository;
- 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:
10 comments
Thank you for sharing. This nice article was helpfull for a quick result. The good Arch Wiki is for when I have more time.
Good article for newbies
Thanks! 🙂
Thank’s very usefull acticle
When using a custom repository, you may need to replace $arch with your current archtecture (i.e. x86_64 or arm).
Thanks for the tip. Excellent article.
==> 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.
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/
AUR method work !!!
Thanks… help me a lot!