How to use AUR aka Arch User Repository
Arch has a very huge repository of packages, however not everything is available through repos and oftentimes you may have to compile packages from AUR. While you can do it manually and it’s very easy, I tend to use tools like ‘yaourt’ to compile packages.
How to manually compile packages from AUR
You can search for the desired package in AUR and download the snapshot. In this example were installing Geary email client. We have downloaded the git snapshot, extract the downloaded package:
tar –xvf gearty-git.tar
cd to the extracted folder
cd geary-git
Run the following command as regular user (non-root)
makepkg –sri
It will ask you to enter root password when required. If no error are reported it will proceed to install. Once it awhile it will seek your confirmation to install packages and dependencies. That’s how simple it is to compile packages on Arch.
Using Yaourt to install AUR packages
The above method requires you to search for package from AUR repositories from a web browser, download the snapshot and then install manually. Alternatively, you can use tools like Youart that allow you to install AUR packages from the command line. Install Yaourt, along with its dependency ‘package-query’.
git clone https://aur.archlinux.org/package-query.git
Change directory into the downloaded package:
cd package-query
Run the makepkg command:
makepkg –sri
As usual it will ask you password, once the package is compiled and install, cd out of the package-query directory:
cd ..
Download the yaourt package from GIT
git clone https://aur.archlinux.org/yaourt.git
Change directory,
cd yaourt
And run makepkg:
makepkg -si
Once installed, get out the yaourt directory:
cd ..
You have Yaourt installed on your system.
How to use Yaourt
The first rule of Arch Club is: always refresh repository info before installing any package:
yaourt -Syu --aur
This command sync database, upgrades installed packages and AUR packages.
Installing packages with yaourt
The good news is that yaourt can also install those packages that are already available in the repo. So if you want to install GIMP, you can either use pacman:
sudo pacman –S package_name
Or you can use yaourt:
yaourt -S gimp
If you want to search only AUR skipping packages from official repo then use without –S or use –aur flag:
yaourt --aur gimp
Let’s try to install Plex Media Server which is not in the official repos.
yaourt plex-media
You will see a list of packages related to Plex Media Server. It also shows how many people have installed it. All you need is enter the number of that package. Yaourt resolves all dependencies, compiles the packages and installs them.
Yaourt will also show if there were any bugs and errors reported by other users during compiling so play close attention. If there is any comment, Yaourt offers to edit the package file with your desired editor to make suggested changes.






