likes
comments
collection
share

Install a Package from AUR || Or Manually install

作者站长头像
站长
· 阅读数 4

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.

Sometime beacause of network can't download package

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

$ yay -S caffe

Install a Package from AUR || Or Manually install


cd to the .cache folder

$ cd .cache/yay
or
$ cd .cache/pacman

find the package folder that we want to install

Install a Package from AUR || Or Manually install


open PKGBUILD file and find download url and download manually, change url to local downloaded package url

like this

Install a Package from AUR || Or Manually install

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.