Arch Linux User Repository (AUR)
The Arch User Repository (AUR) is a community-driven repository for Arch Linux users. The AUR was created to organize and share new packages from the community and to help expedite popular packages’ inclusion into the extra repository.
Warning: AUR packages are user-produced content. Any use of the provided files is at your own risk.
Prerequesites
Following dependencies are needed to be installed.
1
sudo pacman -S git curl wget build-essential
Installing AUR packages manually
First you need to visit Arch Linux AUR and look for a package (application) you want. For instance we will install an AUR helper like yay. Therefor open a terminal and change your working directory to /opt. This is the common location for installing AUR packages. On the AUR website we are searching for yay, click on the package name and copy the GIT url to clipboard. In Terminal (as root):
1
sudo git clone https://aur.archlinux.org/yay.git
After cloning change the permissions to your user and change in the yay directory, like:
1
sudo chown -R ${USER}:${USER} yay && cd yay
Next to download, compile and package it run:
1
makepkg -si
| parameter | description |
|---|---|
| -s | Means synchronize dependencies |
| -i | Install after building, compiling and packaging |
If done correctly you now have installed an AUR helper.
Installing AUR packages with AUR helper
yay is called a pacman wrapper. It means you can also use it to install packages from the offial arch repos.
1
yay proton
Output:
1
2
3
4
5
6
7
8
3 extra/protonmail-bridge-core 3.12.0-3 (7.9 MiB 25.4 MiB)
Integrate ProtonMail paid account with any program that supports IMAP and SMTP (core executable and daemon)
2 extra/protonmail-bridge 3.12.0-3 (1.5 MiB 3.1 MiB)
Integrate ProtonMail paid account with any program that supports IMAP and SMTP (Qt desktop application)
1 aur/proton 1:9.0.2.4-1 (+110 2.38)
Compatibility tool for Steam Play based on Wine and additional components
==> Zu installierende Pakete: (z.B. 1 2 3, 1-3 oder ^4)
==>
yay is shown the best suited answer with the corresponding number in front. You can install the applications by just hit 1 and enter or type 1-3 for all applications or 1 3 for the first and the third application. You can also do:
1
2
3
yay -S proton-ge-custom
yay -R proton-ge-custom
yay -Rsnc proton-ge-custom
| parameter | description |
|---|---|
| -S | Installs programs |
| -R | Removes programs, but leave any configuration dirs |
| -Rsnc | Remove programs including configuration dirs and dependencies |
Troubleshooting
If some AUR package doesn’t install because of an error in PKGBUILD you can have a look at this in ~/.cache/yay/packagename. For example, I like the windows app mp3tag. Sadly there’s no similar good program in Linux. The AUR git for this program is designed to ever download the latest setup.exe and installing it into a wine prefix. Nevertheless it also compares the downloaded file with a SHA256 checksum which do not match if the download setup version is newer than the PKGBUILD script. So I open a terminal and the corresponding PKGBUILD, e.g. in ~/.cache/yay/mp3tag/PKGBUILD. It looks somewhat like this.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
pkgname=mp3tag
pkgver=3.26
pkgrel=1
pkgdesc="The universal tag editor"
arch=(i686 x86_64)
url="https://www.mp3tag.de/en/"
license=(custom)
depends=(wine)
makedepends=(p7zip)
source=(mp3tag
LICENSE
mp3tag.desktop
mp3tag.png)
source_i686=("https://download.mp3tag.de/${pkgname}v${pkgver/./}setup.exe")
source_x86_64=("https://download.mp3tag.de/${pkgname}v${pkgver/./}-x64-setup.exe")
sha256sums=('378eabc03c7a4c6aa56c5aa90141204a04b727f7dc60e66a7f36a87a7eeae7d8'
'18967b634e69d8ccb08383d42a49ced3c0b11c632649a15c3a6a55e3a27f62e9'
'bc0c7b8a7a9f9ee92dfe2f1880ef5d91920473713b5d60e4afa361d69a446798'
'a3e09f7cda34bc31b3b5b1d7cf2010c3b17847c141ef5a074472eb72f760f6bf')
sha256sums_i686=('ae1ba0d8b3f73c53a0f12886590e2d6d6159769c1bc99579c3c3cc0e46f07972')
sha256sums_x86_64=('02a277625061d2999a9af143d84b8d76387cf5683d11baeb599bc4a5df0e615e')
....
The newest version, as of writing this, is version 3.27a so I go to there official website and download the latest setup.exe. After that I must generate a new SHA256 checksum of that file and replace it with the architecture checksum of my system.
1
sha256sum mp3tagv327a-x64-setup.exe
Output is:
1
4fcf96d0fb2fb3ac649803ecf927d260437e05e5f762a98ec5c01770b351fe1f mp3tagv327a-x64-setup.exe
After replacing the new checksum with the old one save PKGBUILD file run this inside the same directory:
1
makepkg -si
This is only an example when things go wrong and to be clear this happens very very seldom.
Further reading: ArchLinux Wiki > AUR & ArchLinux Wiki > AUR helper
