Arch Linux: Install packages from AUR (Arch User Repository)

These days there are many good Linux/Unix distributions which do come with some great software out of the box. In some cases it might just be that the software you want is not available by default nor shall it be found on the default distribution repositories.

When I used Arch Linux ( I realized that some of my favorite programs were only available in Arch User repository which is driven by the Arch user community and contains quite a few extra programs to tune an installed Arch system.

Here is a quick how to for building and installing program(s) from AUR to your local Arch Linux:

1. Go to Aur website and search for the program you want to install:

2. When you have found the program you want click: Download tarball to get the actual source code with a pkgbuild file. Pkgbuild files are package management files used by Arch containing information needed to build  software packages for Arch from a source code

3. When tarball download is finished unzip the content of it to a folder inside your home directory.

4. Create directories /home/packages and /home/sources. You need to become a root or a sudo in order to do so. The home/sources and home/packages folders are used by Arch to contain a source code of the program you have compiled to a package (/home/sources folder) and the actual software package you can install to your system once everything is done  (home/packages folder).

5. To build a package go to a folder containing the files we unzipped from the tarball previously. ( the pkgbuild file and the source code). Before you build anything do make sure that the pkgbuild file does not contain anything odd or malicious.

6. Once you have checked that everything is as it should be then you need to open your terminal client (xterm,eterm,gnome-terminal…) and become a root or sudo. Next cd in to the folder containing the unzipped tarball files.  An example: cd /home/tester/xtrlock

7. Build your package with the following command: makepkg -s – -asroot

Note: there should be no space between the – –

8.Once the package building is finished you will find your software package(s) inside /home/packages. Install the packages as a root or  a sudo with the command: pacman -U packagename.tar.xz

or use the following command (as a root or a sudo) to install all files in a given directory:

pacman -U *.tar.xz