How To Install Software From The Arch Linux User Repository
One of Arch Linux’s greatest strengths is it’s powerful, user-powered repository. With it, users can upload their own packages. As a result, Arch Linux enjoys some of the best software availability on Linux. Since there is growing interest in Arch AUR, we’ve decided to go over it in detail. We’ll talk about building packages by hand, explain what a “PKGBUILD” is, and even show you some programs that make interacting with the Arch Linux User Repository easy. Here’s how you can install software from the Arch Linux User Repository.
SPOILER ALERT: Scroll down and watch the video tutorial at the end of this article.
The Disadvantages Of An AUR Helper
For new Arch users, installing an AUR package without an AUR helper might seem difficult. The reality is that it is incredibly useful because, by building the packages yourself, you can save them. When a user downloads everything they need to make the PKGBUILD work, the package manager spits out a regular package. This regular package can be installed quickly, instead of compiling before installation.
If you run Arch Linux on a lot of PC’s, and you rely on AUR software, this is a great thing. There is no need to compile large software on slow CPUs that are not optimized. Instead, compile the packages one time on your fastest CPU, and send them over.
Installing AUR Packages Without A Helper
To install software from the Arch Linux User Repository, you’ll need to download “snapshots”. Keep in mind, that installing these packages can (at times) be tedious. This is due to the fact that some packages have libraries and programs needed to build the source code. Under normal circumstances, these dependencies will easily be filled in by the native Arch Linux package repository. Other times you might not be as lucky. Some packages may require dependencies that also need to be built via snapshot.
To start off, go to the AUR. This is a website that anyone can upload PKGBUILD files to. A PKGBUILD is a script tailored specifically for Arch. It outlines in detail how to grab the source code of a program and install itself. Anyone can upload one of these files which means that the AUR can be unsafe at times.
Users shouldn’t be worried though. Each package uploaded has a comments section. This section allows users to comment about the stability and safety of the package, as well as to help other users get the program working on their system. There is also a report function that users can use if they feel a PKGBUILD file in the AUR is malicious.
Use the search feature on the website, and search for a program you want. In this example, we’ll be using Google Chrome. On the package page, look for “Download snapshot”, and click on it. When the download completes, open a terminal, and do the following:
First, use the cd
command to enter the ~/Downloads
directory.
cd ~/Downloads
Inside Downloads, untar the snapshot file using the tar
command.
tar -xvzf google-chrome.tar.gz
Enter the new folder that the tar command made, with the cd command.
cd google-chrome
Use the ls
command to view all of the contents of this folder.
ls
You’ll notice several files. In this case, there is an install.sh shell script. Ignore this. Instead, enter this command:
makepkg
The makepkg
command tells the system to generate a native Arch Linux package for Google Chrome. Give it time to build. It has to download the Ubuntu Google Chrome package, dissect it and convert it. You’ll know it’s done when the terminal window is usable again.
Use the ls
command to view the contents of the folder again. Inside the Google Chrome snapshot folder, a new native arch package is present. Move the arch package to your home folder.
mv google-chrome*.tar.gz ~/
Enter the CD command to change back to the home folder, to start the install process.
cd ~/
Finally, install the AUR package to the system.
sudo pacman -U google-chrome*.tar.gz
With all that, the AUR package is built. Keep in mind, that since the package wasn’t installed via a helper, you’re free to distribute this package to other PC’s and skip the compile process.
Advantages Of Using AUR Helper
Being able to compile a package from the AUR and save it for later is a real plus. The problem is, it can be tedious at times. This is why most people use an “AUR Helper”. These are programs that seek to help users easily download PKGBUILD files and invoke the compile process with just a few steps. This method is by far the preferred method for Arch Linux users who love the AUR, but hate having to do everything by hand.
There are many different AUR helpers, but they all essentially do the same thing. That’s why instead of covering them all, we’ll be going over the 3 best ones!
Note: these AUR helpers are not in the main Arch repositories. To get them on your Linux PC, you’ll need to compile the PKGBUILD by hand. Follow the instructions above.
Yaourt
Yaourt is by far the most used AUR helper. First, search the Arch User Repository for what you want to install. This is done similar to the pacman package manager itself (with -Ss). In this example, we’ll be using Google Chrome once again.
yaourt -Ss google chrome
The search will display results directly from the AUR (in relation to the keywords you used). To install the software, keep note of the package name. In Chrome’s case, the package is “google-chrome”.
yaourt -S google-chrome
This basic command will take you through the install process. Trouble is, it is very tedious, and asks the user to repeatedly select “yes” and “no”. To install software with no hassle, use the –noconfirm flag.
yaourt -S google-chrome --noconfirm
To update software installed via the AUR, do:
yaourt -Syyu --aur --noconfirm
This will tell Yaourt to update Arch, and download/build new AUR packages without any hassle.
Pacaur
Pacaur is another AUR helper that aims to make building package easy. Here’s how to use it:
First, find a package in the AUR. Like before, we’ll use Chrome as the example.
pacaur -Ss google-chrome
Find the name of the package. In Chrome’s case, it’s google-chrome.
Install the software with:
pacaur -S google-chrome
Answer the questions that Pacaur asks about the install process, or (like Yaourt) skip them entirely with:
pacaur -S google-chrome --noconfirm
To update packages on Arch Linux, as well as programs built from the Arch User Repository, run this command:
pacaur -Syyu
Octopi
For those on Arch that want a GUI tool to interact with the Arch Linux system, as well as the AUR, Octopi is the best solution. To install software from the Arch User Repo, click the green face icon. This launches a wrapper for the Octopi tool. Next, enter a search term, like “Google Chrome” for example.
Soon, a results page appears. Right click on the app you want to install, and click “install”. Octopi will take you through the installation process.
Note: the program will notify you when there are updates.
Conclusion
Arch Linux is a favorite by many in the community due to it’s vast software availability. With the AUR, installing unsupported programs is incredibly easy. If you’re new to Arch Linux, learning to master this tool will vastly improve your Arch Linux experience.
Hello Derrik,
Thank you for a nice overview on how to work with the AUR packages in Arch.
Very clear and useful.
Regrettably pacaur and yaourt are no longer available as helpers for the AUR packages.