Install AUR Packages with Yaourt on Arch Linux


Yaourt is community-contributed package forked from official pacman which adds access to the AUR packages and able to install aur packages automatically using PKGBUILDs on AUR packages. Before install a packages from AUR,

Yaourt will download the PKGBUILDS (Build Instructions) of the package, build the packages using makepkg (it will take times), then install the built packages.

Install Yaourt

Edit the /etc/pacman.conf file using a text editor such as nano:
sudo nano /etc/pacman.conf
Then add following:
[archlinuxfr]
SigLevel = PackageOptional
Server = http://repo.archlinux.fr/$arch
Update the package database then install following packages:
sudo pacman -Syy automake autoconf base-devel binutils customizepkg expac fakeroot gcc git jshon linux-headers m4 rsync subversion yaourt

Install packages with Yaourt

To install a package from AUR using Yaourt with the confirmation dialog, follow the following commands:
yaourt -S aurpackage
Edit PKGBUILD ? [Y/n] ("A" to abort)
 Type "n" to skip
Edit ttf-ms-fonts.install ? [Y/n] ("A" to abort)
 Type "n" to skip
Continue building ttf-ms-fonts ? [Y/n]
 Type "Y" to continue build the package
[v]iew package contents [c]heck package with namcap
 Press enter
Proceed with installation? [Y/n] 
 Type "Y" to install the package
To install a package from AUR using Yaourt without the confirmation dialog, follow the following commands:
yaourt -S aurpackage --noconfirm

Troubleshooting

Failed to set default locale

It probably the system locale preferences is not configured properly, try to re-configure the locale preferences: Uncomment the locales in /etc/locale.gen to your locale (e.g. EN)
#en_US.UTF-8 to en_US.UTF-8
Then generate the locale with:
locale-gen
Set locale preferences in /etc/locale.conf and possibly $HOME/.config/locale.conf to your locale (e.g. EN): (case sensitive) echo LANG=en_US.UTF-8 > /etc/locale.conf Warning: The locale configuration is case sensitive if any characters mistyped it will affect the locale configuration, reboot to take effects. If above steps doesn't work and you've still received "Failed to set default locale" try this alternative steps: Edit the .bashrc file using a text editor such as nano:
sudo nano ~/.bashrc
Then add following (change it to your locale e.g. EN):
export LANG=en_US.UTF-8
export LC_MESSAGES="C"
export LC_ALL=en_US.UTF-8...

Failed to find a command (Command not found)

Command not found means the command that yaourt need to compile the package is missing, you can install the missing command: (e.g. automake/aclocal: command not found)
pacman -S automake
If you can't find the missing command to install, try to find it from Search engines such as DuckDuckGo

References

  1. yaourt a pacman frontend - ArchLinux.fr
  2. Locale warnings everywhere - Arch hacking and troubleshooting
  3. Image by dxiri / CC BY 2.0

Comments