Install Yaourt on Arch Linux

Install Yaourt on Arch Linux

Yaourt is a package manager that is mainly used in installing packages from Arch User Repository or AUR. But it can also install packages from Arch official package repository.In this article, I will show you how to install and use Yaourt. Let’s get started.

Installing Yaourt

Yaourt package manager is not available in the official package repository of Arch Linux. But it is available on Arch User Repository (AUR). So you have to install it from AUR.

First install Git with the following command:

$ sudo pacman -S git

Press ‘y’ and then press <Enter> to continue.

Git should be installed.

Now navigate to a temporary directory. You may choose /tmp,but I will choose ~/Downloads/ directory in the USER’s home directory.

$ cd ~/Downloads/

Yaourt depends on another package called package-query. But it is not available on the official package repository of Arch Linux. You have to install it from AUR before you can install yaourt package.

Run the following command to clone the package-query AUR repository with Git:

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

package-query AUR repository should be cloned.

I listed the directory contents with ls command and you can see that a new directory package-query was created.

Navigate to the package-query/ directory with the following command:

$ cd package-query

Now you can use makepkg command to create a pacman package file using the AUR repository files. You can then install it using pacmanpackage manager.

Now run the following command to create a pacman package file for package-query:

$ makepkg -s

Press ‘y’ and then press <Enter> to continue.

The package-query pacman package file is created.

I listed the directory contents of package-query/ with ls command and as you can see from the marked section in the screenshot below, a .pkg.tar.gz file was created. This is the pacman package file.

Now you can install the pacman package file with the following command:

$ sudo pacman -U package-query-*.pkg.tar.xz

Now press ‘y’ and then press <Enter> to continue.

package-query package should be installed.

Run the following command to check whether package-query command is working or not:

$ package-query –version

As you can see from the screenshot below, the version of package-query installed on my machine is 1.9. So it’s working.

Now go back to the parent directory with the following command:

$ cd ..

Now you can install Yaourt.

Run the following command to clone the Yaourt AUR repository with Git:

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

The Yaourt AUR repository should be cloned.

A new directory yaourt/ should be created as you can see from the screenshot below.

Now navigate to the yaourt/ directory with the following command:

$ cd yaourt/

Now run the following command to make a pacman package file for Yaourt:

$ makepkg -s

The Yaourt pacman package file should be created.

I listed the directory contents with ls command and as you can see from the marked section in the screenshot below that a .pkg.tar.xz file was created.

Now run the following command to install Yaourt with pacman:

$ sudo pacman -U yaourt-*.pkg.tar.xz

Press ‘y’ and then press <Enter> to continue.

Yaourt should be installed.

Now run the following command to check whether yaourt is working or not:

$ yaourt –version

 

As you can see from the screenshot below, the version of yaourt installed on my machine is 1.9. So yaourt is working.

Using Yaourt

You can search for a package using yaourt.

You can run the following command to search for packages in the Arch official repository and Arch User Repository that contains the term ‘programming’ with yaourt:

$ sudo yaourt search programming

As you can see from the following screenshot, the search result is displayed. The package names as marked in the screenshot contains core/ or aur/ to represent that the package is in the official Arch repository or AUR respectively.

You can see numbers in the search result as marked in the screenshot below. You can type in the number and press <Enter> to install that particular package with yaourt. For example, if you want to install lush2, then you would be typing 3 and press <Enter>.

You can also install a package from AUR if you know the package name. For example, I am trying to install snapd package. So I ran the following command:

$ yaourt -S snapd

Keep pressing ‘y’ in every prompt.

Yaourt should download and install snapd package from AUR.

So that’s how you install and use Yaourt package manager on Arch Linux. Thanks for reading this article.

Related Posts
Leave a Reply

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