How to install AUR packages with pacman

AUR is an unofficial arch repository where you can find many packages, though the problem is that if you don't have everything under the scope of pacman your OS may crash. A good practice is to build AUR packages using pacman.

Let say we want to install openframeworks from AUR. You have to do the following steps:

  • STEP 1: Make sure that you have install all dependencies using pacman
  • STEP 2: On the menu on top right 'Package Actions' right click on the link Download snapshot and select Copy Link Location
  • STEP 3: Make a directory on your $HOME, lets say mkdir $HOME/PKGBUILDS, and wget https://aur.archlinux.org/cgit/aur.git/snapshot/openframeworks.tar.gz (the copied link location, usually in terminal use Shift+Insert to paste)
  • STEP 4: tar xf <package name>.tar.gz to uncompress the package folder
  • STEP 5: Change directory and open PKGBUILD file to see if everything is OK. You can do the same before downloading the package in 'View PKGBUILD', in 'Packages Actions'. Read also the 'Latest Comments' as you might find some useful information.
  • STEP 6: If everything looks fine makepkg to build the package. If no errors/warnings occur you should be OK.
  • STEP 7: Install the package using pacman sudo pacman -U $HOME/PKGBUILDS/package_name-version.pkg.tar.xz

If you would like to remove the package sudo pacman -R <package name>.

Latest posts