Yaourt

From ArchWiki

Jump to: navigation, search
i18n
English
Italiano
简体中文
Español
Türkçe
Français
Русский

Consider before asking for support:

  • Prefer installing yaourt-git instead of yaourt as some features are broken in current version.
  • Yaourt is an unofficial, unsupported third-party script.
  • 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 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.

Contents

Install

First of all

Install the "build-devel" package, so that you won't miss utilities like gcc or make later on.

pacman -S base-devel

Install

Install Yaourt through the AUR. In learning how to install yaourt this way, you will have the opportunity to learn how the AUR (and PKGBUILDs) work.

Open a web browser and head to the yaourt AUR page

Under package details click the "Tarball" link to 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. 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

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! Remember, this is the SAME process for almost all AUR PKGBUILDs.

See the yaourt man page for more.

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

Proxy Settings

If you access the Internet through HTTP Proxy, you may have to set proxy for pacman in order to get it work. Otherwise you'll probably get "No route to host" when using yaourt, as yaourt doesn't take the environment variables set in ~/.profile, /etc/profile or wherever it is.

To set proxy, simply edit /etc/pacman.conf, assume that we are using curl to retrieve files. Add --proxy proxyhost:port after curl like below:

XferCommand = /usr/bin/curl --proxy proxy.hostname.com:port %u > %o

For more info check curl's man page.

Using yaourt

Detecting previous builds for dev PKGBUILDs

Julien Mischkowitz's (maintainer of yaourt) directions on how to get yaourt to detect previous build attempts for dev packages (CVS, SVN, Bzr, etc.):

 This part is very old in yaourt and maybe needs to be updated :-)
 Actually, yaourt search for variable ${_bzrtrunk} and ${_bzrmod} to detect if the PKGBUILD is one for a git/svn/bzr/cvs version.
 So just replace "_bzr_branch='http://bzr.savannah.gnu.org/r/emacs/trunk'" by "_bzrtrunk='http://bzr.savannah.gnu.org/r/emacs/trunk'"

That is, be sure to have _${VCS}trunk and _${VCS}mod variables present in your PKGBUILD; i.e., _bzrtrunk and _bzrmod for Bzr packages, _hgtrunk and _hgmod for Mercurial packages, _gittrunk and _gitmod for Git, etc.

Personal tools