How to install and use Yaourt in Arch Linux

Archlinux-icon.png

Yet AnOther User Repository Tool. Yaourt is a community-contributed wrapper for pacman which adds seamless access to the AUR, allowing and automating package compilation and installation from your choice of the 11,000+ PKGBUILDs in the AUR, in addition to the many thousands of available Arch binary packages. Yaourt uses the same exact syntax as pacman, which saves you from relearning an entirely new method of system maintenance, but also adds new options. Yaourt expands the power and simplicity of pacman by adding even more useful features and provides pleasing, colorized output, interactive search mode, and much more. You will almost certainly want this.

The traditional way to install Yaourt is through the actual AUR. In learning how to install yaourt this way, you will have the opportunity to learn how the AUR (and PKGBUILD)works.

Open a web browser and head to the yaourt AUR page

Under package details download the tarball

Unpack the tarball

tar zxvf yaourt.tar.gz

Navigate into the new directory

cd yaourt

At this point; Make sure that you check the contents of the PKGBUILD and the yaourt.install files! This cannot be stressed enough, don’t worry, they aren’t too complicated. Just take a look, if you see anything suspicious, get on irc or the forum and ask about it.

more yaourt.install
more PKGBUILD

If everything looks good. We are ready to build the packages.

makepkg PKGBUILD

After this process is complete, you will see several new files and directories. You should be interested in the file that ends with *.pkg.tar.gz (in this case mine is named; yaourt-0.9.2-i686.pkg.tar.gz)

Now it’s time to use pacman to install yaourt. Be sure to change the package name to the actual name of your package, don’t just copy and paste this line

pacman -U yaourt-0.9.2-i686.pkg.tar.gz

Congratulations! You’re done!

Easy Install

The easiest way to install Yaourt is to add the yaourt repository to your /etc/pacman.conf:

For i686:

[archlinuxfr]
Server = http://repo.archlinux.fr/i686

For x86-64:

[archlinuxfr]
Server = http://repo.archlinux.fr/x86_64

Sync and install:

pacman -Sy yaourt

Using Yaourt

Functions:

  • search both in AUR and in pacman’s repos
  • Colorized output of the search results with indication of already installed softwares
  • packages installation from repos and from AUR with a unique command
  • interactive search mode (search and select by typing package number)

yaourt_interactiv

  • option: software installation from sources (abs) with srcpac
  • removal of useless packages:

yaourt-qt

  • global update of all packages from AUR
  • totally compatible with pacman/pacman-drive/pacman-cage
  • reuse of pacman’s options (see pacman –help)
  • detection of orphaned packages after update
  • config file editor (see pacdiffviewer -h)
  • improved search to find where does a file come from

Search and install
yaourt [keywords]: quick search + install
yaourt -S [packages] : install package, Compile it from AUR if needed
yaourt -Ss
[keywords] : search on repos and on AUR (with notice for already installed packages)
yaourt -Sb [packages] : install a packages by compilation from sources (abs)
yaourt -Sl [repos] : prompt for packages of the selected repos (emphasize those already installed)
yaourt -Qs [keywords] : colorized ouput of installed packages and the repos where they come from
yaourt -Qo
[progname] or [filename] : shows the package which provides the program or the file

Updgrade:
yaourt -Syu : complete update and upgrade of the system (onlys from repos)
yaourt -Syu –aur : complete update and upgrade, even for packages coming from AUR
yaourt -Sybu –aur : complete update and upgrade by compilation of all packages (repos and AUR)
yaourt -Su –devel : update and upgrade of cvs/svn/mercurial/git packages

Cleaning:
yaourt -C : editing and merging of .pacnew/.pacsave
yaourt -Cc : removal of all .pacnew/.pacsave
yaourt -Qt : search for orphaned packages
yaourt -Cd : search for obsolete repos

Other options:
–export [directory] : exports compiled packages for gensync
yaourt -S –aur [packages] : forces compilation from AUR for a packages which is also in repos
yao
urt -G
[packages] : retrive PKGBUILD and local sources in current directory.
yaourt -B : backup the pacman database

Related Posts

Comments are closed.