Difference between revisions of "Yaourt"

From ArchWiki
Jump to: navigation, search
(Installation: clarify since this is a popular article especially among people who are first exploring the AUR "world"; note that this is perfectly complying with Help:Style#AUR packages)
Line 13: Line 13:
It is important that you understand what "unsupported package" really means, and you can take this as an opportunity to learn what are the operations that [[AUR helpers]] like yaourt make automatic.
It is important that you understand what "unsupported package" really means, and you can take this as an opportunity to learn what are the operations that [[AUR helpers]] like yaourt make automatic.
{{Tip|yaourt is also available in several [[unofficial user repositories]] including ''[archlinuxfr]''.}}
==Proxy Settings==
==Proxy Settings==

Revision as of 19:01, 24 March 2012

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.

Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어

External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Warning: Yaourt is an unofficial, third-party script that is unsupported by the Arch Linux developers.
Note: Please report bugs at archlinux.fr bugtracker.

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 thousands of PKGBUILDs in the AUR, in addition to the many thousands of available Arch Linux 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.


First you need to install package-queryAUR as a dependency, and then the yaourtAUR package itself. Since both those packages are available from the AUR, you will have to install them with the official method for installing unsupported packages, which is exhaustively described in the Arch User Repository article.

It is important that you understand what "unsupported package" really means, and you can take this as an opportunity to learn what are the operations that AUR helpers like yaourt make automatic.

Proxy Settings

If you access the Internet through an HTTP proxy, you may have to set the environment variables http_proxy and https_proxy in your ~/.bashrc (setting only http_proxy will prevent you from downloading the package from AUR):

$ export http_proxy='http://proxy.hostname.com:port'
$ export https_proxy='https://proxy.hostname.com:port'

For more information, check curl's man page.

sudo does not keep environment variables like http_proxy, so if you use sudo, you must add:

Defaults env_keep += "http_proxy"
Defaults env_keep += "https_proxy"
Defaults env_keep += "ftp_proxy"

to /etc/sudoers.

Warning: It is much safer to not edit /etc/sudoers directly but to use visudo instead.

Using yaourt

You can install packages (including AUR packages) with

$ yaourt packagename

You can update your system including AUR packages with:

$ yaourt -Syua


Search and install:

$ yaourt <search pattern>

Sync database, upgrade packages, search the AUR and devel (all packages based on cvs, svn, git, bzr(...)-version) upgrades:

$ yaourt -Syu --devel --aur

Build package from source:

$ yaourt -Sb <package>

Check, edit, merge or remove *.pac* files:

$ yaourt -C

Get a PKGBUILD (support splitted package):

$ yaourt -G <package>

Build and export package, its sources to a directory:

$ yaourt -Sb --export <dir> <package>

Backup database:

$ yaourt -B

Query backup file:

$ yaourt -Q --backupfile <file>

See also: Pacman and Pacman Tips.


Wrong hashes

When you encounter the problem of yaourt downloading a source and complaining about false checksums (but you know the files are right and no one else is having these troubles updating the package), do the following: Check in /tmp/yaourt-tmp-yourusername/nameofthepackage/src/ which file in /var/cache/yaourt/build is being symlinked to. Then delete that file (as it might be broken and yaourt seems to be unable to delete it on its own) and the yaourt build directory in /tmp/yaourt-tmp-yourusername and you should be good to go and update that package! This issue seems to relate to system crashes during update and/or an open yaourt bug.

Yaourt asking for password twice

If you disable the sudo password timeout by adding

Defaults timestamp_timeout=0

to /etc/sudoers, then yaourt will ask for your password twice each time you try to perform an operation that requires root. To prevent this, add:


to /etc/yaourtrc or to ~/.yaourtrc

Yaourt and upgrading to pacman 4

If you are unable to upgrade to pacman 4 due to dependency conflicts with an older version of yaourt and you use the archlinux.fr repository simply change

SyncFirst   = pacman


SyncFirst   = pacman yaourt package-query

in /etc/pacman.conf This will force yaourt and package-query to be upgraded to pacman 4 compatible versions when upgrading to pacman 4.

External links