There are several packages that are not yet in the official Arch Linux repository and one of the processes for a package to be official is first to be part of the AUR.
The Arch User Repository (AUR) is a community-driven repository for Arch users.
Packages are “formulated” by a file named PKGBUILS and you compile with the makepkg command.
First of all you need to have the construction tools, and to do this install the base-devel
package if you haven’t installed it:
The
--needed
option is to ignore packages that you already have installed, instead of reinstalling them.
Then just
makepkg -si
command
-s
option, automatically resolves and installs any dependencies with pacman before compiling, it uses pacman for this.-i
option installs the package if it was compiled successfully.Example of a fictitious terminalroot
package, I searched the Package search field and clicked and was directed to its page: https://aur.archlinux.org/packages/terminalroot
Well, cloning and compiling is enough to think: Wasn’t it better to automate this process? !! Yes it is. And they already thought about it and created Yay.
I think Yay should already be part of the official repository and we can install it via pacman
, but still (at least until the date of publication of this article) they haven’t done that.
So you need to install it via AUR and then use it to install any other AUR package, weird, but that’s the way it is! To install Yay, run:
Remembering that you need
base-devel
as informed above. During installation it will ask for yoursudo
password to copy the binary to a system path that is in the$PATH
variable.
From then on everything is easier! 🍺
To install anything, just run the yay
command with the -S
parameter similar to pacman and enter the package name.
Remembering that it has auto-complete, therefore, it is easier to identify if the package exists only by pressing TAB when typing the first letters of the name, reducing the need to go to the AUR address. Cool, right ?!
Example again with the fictional terminalroot
package
Only that! Ah, don’t use sudo
!!! He will refuse, he will ask you for the password during the installation, of course, it’s the AUR process! 😃
Alright?! Well, that’s it for today. If you want to go even deeper, I suggest the links below: