How to install a package from AUR on Manjaro Linux

Since Manjaro is based off of Arch Linux, it inherits the amazing perk of having access to the Arch User Repository (AUR). If you don’t know about the AUR, it’s basically a huge repository of community submitted packages. If you’ve worked with PPAs on Ubuntu in the past, it’s a lot like a centralized version of that… but it’s much easier and safer as you’ll see.

Of course, Manjaro has its official repository like any other Linux distribution, but having the AUR as an option allows you to install virtually any package, whether it’s officially availale in pacman or not. If a package performs well enough in the AUR and meets certain standards, it can be absorbed into an official repository and be directly insalled via pacman.

In this tutorial, we’ll guide you through the process of installing a package from the AUR. This involves searching for a desired package and then installing it either from GUI or command line. We’ll show you methods for both below.

In this tutorial you will learn:

  • How to install a package from AUR via GUI
  • How to install a package from AUR via command line

Installing a package from the AUR on Manjaro

Installing a package from the AUR on Manjaro

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Manjaro Linux
Software git, yay
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

Install a Package from AUR via GUI



Manjaro supports a lot of different desktop environments, such as XFCE, KDE, GNOME, etc. In the screenshots below, you’ll see us using the XFCE desktop environment. If you’re using a different desktop interface, your screen will look a little different. The same steps should still be applicable, with the main thing just being that you need to open your software updater app and configure it to connect to the AUR.

  1. Get started by searching for the software updater in your application launcher and opening it.
    Open the software manager in your GUI from the application launcher

    Open the software manager in your GUI from the application launcher

  2. Before continuing, consider updating Manjaro if the software updater indicates that new updates are available. Then, click on the three dots at the top of the screen and open up the preferences menu.
    Open the preferences menu to enable AUR

    Open the preferences menu to enable AUR

  3. Click on the AUR tab and then switch the toggle bar for “Enable AUR Support” to the on position. You’ll be prompted for your root password to make this change. Afterwards, you can close these windows and the changes should be saved.
    Enable AUR support

    Enable AUR support



To begin installing packages from the AUR, you can click on the search icon at the top of the window. If you’d like to search exclusively for AUR packages, you can select the AUR filter on the left side of the screen.

Search for a package to install from the AUR

Seach for a package to install from the AUR

As an example, let’s try installing Dropbox. All we need to do is search for the package and then click “Build” on the one we wish to install.

Click on build on any packages that you wish to install

Click on build on any packages that you wish to install

Click “Apply” towards the bottom to start installing the software you’ve chosen. If a window pops up about trusting and importing a PGP key, that’s normal. You’ll need to accept that to continue.

Click apply begin installing your selected packages

Click apply begin installing your selected packages

Manjaro presents us with a transaction summary. It looks like an extra dependency will be installed along with Dropbox. Click “Apply” once more to proceed with the installation.

Transaction summary presented by the software installer app

Transaction summary presented by the software installer app

That’s all there is to it. We’ve successfully enabled the AUR on Manjro and installed a package from the repository. Below we go over the same steps but via command line.

Install a Package from AUR via Command Line



Now it’s time to learn how to install AUR packages via command line. You can install packages from the AUR manually by using git and makepkg, or use an “AUR helper” program which streamlines the process. One we like to use is called “yay,” so that’s the method we’ll be covering in this section. You’ll also see how to do the manual method, since we must use it in order to install yay in the first place.

Let’s start by installing yay with these steps:

  1. Open a terminal and execute this command to install git:
    $ sudo pacman -S git
    
  2. Then, clone the yay git repository:
    $ git clone https://aur.archlinux.org/yay-git.git
    
  3. Change directory into the newly created yay-git folder and execute the makepkg command like so:
    $ cd yay-git
    $ makepkg -si
    

yay will now be installed. You can expect it to take some time, as it will have to download all the necessary dependencies as well. Now we can use yay to install a package from the AUR. Let’s stick with our previous example of installing Dropbox.

Open a terminal and use the following command to install Dropbox or some other package from the AUR:

$ yay -S dropbox


Output from yay when installing a package from AUR

Output from yay when installing a package from AUR

As you can see, you use yay pretty much the same way you use Manjaro’s default package manager, pacman. The only difference is that it’s not necessary to run the command as root. As you might expect, updating packages from the AUR also follows the same syntax as pacman:

$ yay -Syu

That’s all there is to it. Now you can use yay from the command line to install any packages from the AUR and keep them up to date.

Closing Thoughts

Access to the AUR is incredibly useful and can even be the deciding factor when it comes to choosing a Linux distro to use. With this guide, we learned how to use the AUR from GUI and command line. We also learned how to search for packages, install them, and keep them up to date. Now you have access to the one of the largest repositories of Linux software online.



Comments and Discussions
Linux Forum