I have failed my reading comprehension.
I can’t find an answer in: https://wiki.archlinux.org/title/Arch_User_Repository or in search engine AI slop
sudo pacman -Syu cbonsai
command can’t find a package
The AUR is essentially a non-curated repository of scripts named PKGBUILD which perform some actions and build a package pacman can install. The expected way to use it is to download the PKGBUILD file to a folder, read it to ensure it is not malicious and run
makepkg
which will generate a package you can install with pacman.That being said most people use a helper which does all of that automatically. My recommendation is to install
yay
orparu
using the process I mentioned above to understand it, and from then on use that program to install new stuff. Both of them are drop-in replacements for pacman so you can use them for all package installation.I recommend that before using an AUR helper, you should familiarize yourself with the process by cloning, reading the files, compiling, and installing manually. Then after you think you are good you can install a helper. I use yay.
Also, sometimes pacman itself gets updated and your AUR helper doesn’t work anymore. When that happens you have to update or recompile your helper manually. If you are not familiar with the process it can be difficult. I’m talking from experience, one day after an update my helper didn’t work and I didn’t remember how to do all the process manually, and I had to re read the wiki again.
I think you have the wrong mental model of how the AUR works. You don’t enable it and then it works with pacman (which is what it sounds like you are thinking). Instead, it’s a repository of packages that require a different method of installation. This is described in section 2 of the wiki page you linked:
- Acquire the build files, including the PKGBUILD and possibly other required files, like systemd units and patches (often not the actual code).
- Verify that the PKGBUILD and accompanying files are not malicious or untrustworthy.
- Run makepkg in the directory where the files are saved. This will download the code, compile it, and package it.
- Run pacman -U package_file to install the package onto your system.
More detailed instructions are on that page.
However, if you want a pacman-like experience, you can install an AUR helper. You’ll still need to install the AUR helper via the steps above, though.
I was thinking of something similar to apt
non-free
repositories as I have used debian based distros so far.
Thank you.Yup, that makes sense. I hope you get it working!
You might be interested in chaotic-aur. It’s a repo you can add that has a subset of pre-built aur packages that you can install like normal.
The AUR is a source-based. You can’t install directly from it. The packages must first be built before pacman can install it.
Thank You