• How to install package from AUR


    Hi,
    I have enabled AUR but am unable to install from there. Here is an example:

    sudo pacman -Syu stapler

    Now, stapler exists in the AUR repo but it says that it can not be found.

    Sorry, I am new to Arch, but very well-versed with dnf/yum on Fedora/Redhat/CentOS and apt in Debian so I was expecting to be able to just install from those repos. Are similar options possible in Arch?

    Thanks again!

  • @aarem pacman works with standard Arch repos only. AUR is not a part of them. pacman is not as permissive as yum/dnf in fedora, or apt in debian. pacman will never install any package from AUR.

    Use yaourt instead of pacman to install a package from AUR

    $ yaourt stapler
    1 aur/stapler 0.4-3 (75)
        A small utility making use of the pypdf library to provide a (somewhat) lighter alternative to pdftk
    2 aur/stapler-git 0.3.2.r11.gdc496c5-1 (95)
        Manipulate PDF documents from the command line
    ==> Enter n° of packages to be installed (ex: 1 2 3 or 1-3)
    ==> -------------------------------------------------------
    ==> 1
  • @just said:

    @aarem pacman works with standard Arch repos only. AUR is not a part of them. pacman is not as permissive as yum/dnf in fedora, or apt in debian. pacman will never install any package from AUR.

    Use yaourt instead of pacman to install a package from AUR

    $ yaourt stapler
    1 aur/stapler 0.4-3 (75)
        A small utility making use of the pypdf library to provide a (somewhat) lighter alternative to pdftk
    2 aur/stapler-git 0.3.2.r11.gdc496c5-1 (95)
        Manipulate PDF documents from the command line
    ==> Enter n° of packages to be installed (ex: 1 2 3 or 1-3)
    ==> -------------------------------------------------------
    ==> 1
    

    Thanks! I noticed that you did not use sudo there. Does that mean that ths package is installed somewhere else, or should we use sudo?

    Many thanks again!

  • @aarem said:

    …I noticed that you did not use sudo there. Does that mean that ths package is installed somewhere else, or should we use sudo?..

    Very good observation. Glad you’ve noticed it.

    Don’t worry. yaourt and other Arch package managers will install all packages in the standard location only. Any package may be removed by the standard pacman later.

    yaourt is never launched with root privileges. It is always executed from a standard user account. sudo is not needed for yaourt.

    $ yaourt [commands]
    

    If [commands] require elevated privileges, yaourt will ask for the root’s password.

    Any package installed by pacman, yaourt, pamac, pacmanxg, other package managers may be subsequently uninstalled by pacman. Like this

    $ sudo pacman -Rcnsu [package]
    

    The command will remove the package and all its dependencies.

  • @just said:

    @aarem said:

    …I noticed that you did not use sudo there. Does that mean that ths package is installed somewhere else, or should we use sudo?..

    Very good observation. Glad you’ve noticed it.

    Don’t worry. yaourt and other Arch package managers will install all packages in the standard location only. Any package may be removed by the standard pacman later.

    yaourt is never launched with root privileges. It is always executed from a standard user account. sudo is not needed for yaourt.

    $ yaourt [commands]
    

    If [commands] require elevated privileges, yaourt will ask for the root’s password.

    Any package installed by pacman, yaourt, pamac, pacmanxg, other package managers may be subsequently uninstalled by pacman. Like this

    $ sudo pacman -Rcnsu [package]
    

    The command will remove the package and all its dependencies.

    Thank you very much! Btw, how does one find out which package contains a specific file or binary? Say /usr/include/Rmath.h ?

  • @aarem If you think that the question has been answered, can you be so kind to mark the topic as [Solved]? Thank you.

  • Thank you very much! I had one more question, and that is: does pacman -Syu (which I use to update packages) also update packages obtained using yaourt? If not, which command should I use such that all packages (installed from AUR, Antergos or Arch) are updated?

  • @aarem said:

    …does pacman -Syu (which I use to update packages) also update packages obtained using yaourt?

    No, it does not. pacman do not work with packages installed from AUR.

    If not, which command should I use such that all packages (installed from AUR, Antergos or Arch) are updated?

    To upgrade all packages, from standard repos and AUR, use the command

    yaourt -Syua
    

    It will upgrade all packages from standard repos first, and then will proceed doing the same for AUR packages.

  • Hello, not if it’s okay, but to update use yaourt:

    $ yaourt -Syyu --devel --aur

    Autodidacta en la VIDA …y en Linux, también.

  • OK, from what i understood after looking up yaourt, I should use:

    yaourt -Syua --aur

    since the --devel installs the developmental packages. Please confirm.

    Btw, what does the second y in yaourt -Syyu do?

    Thanks!

  • @aarem said:

    OK, from what i understood after looking up yaourt, I should use:

    yaourt -Syua --aur

    since the --devel installs the developmental packages. Please confirm.

    Btw, what does the second y in yaourt -Syyu do?

    yaourt -Syua
    

    does everything you need, without installing devel packages.

    The second y forces re-reading package lists. When only one y is used and the package manager (pacman, yaourt) sees that local packages info is up-to-date with those on the mirror, the package manager skips re-reading package databases from the mirror.

    With the second y it re-reads them unconditionally.

Posts 12Views 5301
Log in to reply