Difference between revisions of "Yaourt"

From ArchWiki
Jump to: navigation, search
(Troubleshooting: - Add "Yaourt freezing during PKBUILD download" section)
m (Style fixes.)
Line 32: Line 32:
 
{{Note|Please report bugs at the [http://bugs.archlinux.fr archlinux.fr bugtracker].}}
 
{{Note|Please report bugs at the [http://bugs.archlinux.fr archlinux.fr bugtracker].}}
  
==Installation==
+
== Installation ==
First you need to install {{AUR|package-query}} as a dependency, and then the {{aur|yaourt}} 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.
+
 
 +
First you need to install {{AUR|package-query}} as a dependency, and then the {{aur|yaourt}} 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 [[AUR]] 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.
  
 
Alternatively you can add the ''archlinuxfr'' repository as described on the [http://archlinux.fr/yaourt-en yaourt homepage].
 
Alternatively you can add the ''archlinuxfr'' repository as described on the [http://archlinux.fr/yaourt-en yaourt homepage].
  
==Proxy Settings==
+
== Proxy settings ==
  
 
If you access the Internet through an HTTP proxy, you may have to set the environment variables {{ic|http_proxy}} and {{ic|https_proxy}} in your {{ic|~/.bashrc}} (setting only {{ic|http_proxy}} will prevent you from downloading the package from AUR):
 
If you access the Internet through an HTTP proxy, you may have to set the environment variables {{ic|http_proxy}} and {{ic|https_proxy}} in your {{ic|~/.bashrc}} (setting only {{ic|http_proxy}} will prevent you from downloading the package from AUR):
Line 50: Line 51:
 
  Defaults env_keep += "ftp_proxy"
 
  Defaults env_keep += "ftp_proxy"
  
==Using yaourt==
+
== Using yaourt ==
  
 
You can install packages (including [[AUR]] packages) with
 
You can install packages (including [[AUR]] packages) with
  
{{bc|$ yaourt ''packagename''}}
+
$ yaourt ''packagename''
  
You can update your system including [[AUR]] packages with:
+
You can update your system including AUR packages with:
{{bc|$ yaourt -Syua}}
+
  
See [http://archlinux.fr/man/yaourt.8.html] or {{ic|man yaourt}} for more information.
+
$ yaourt -Syua
  
==Examples==
+
See the [http://archlinux.fr/man/yaourt.8.html yaourt manual page] for more information.
 +
 
 +
== Examples ==
  
 
Search and install:
 
Search and install:
{{bc|$ yaourt <search pattern>}}
+
$ yaourt ''search pattern''
 
Sync database, upgrade packages, search the AUR and devel (all packages based on cvs, svn, git, bzr(...)-version) upgrades:
 
Sync database, upgrade packages, search the AUR and devel (all packages based on cvs, svn, git, bzr(...)-version) upgrades:
{{bc|$ yaourt -Syua --devel }}
+
$ yaourt -Syua --devel  
 
Build package from source:
 
Build package from source:
{{bc|$ yaourt -Sb <package>}}
+
$ yaourt -Sb ''package''
 
Check, edit, merge or remove *.pac* files:
 
Check, edit, merge or remove *.pac* files:
{{bc|$ yaourt -C}}
+
$ yaourt -C
 
Get a PKGBUILD (support split package):
 
Get a PKGBUILD (support split package):
{{bc|$ yaourt -G <package>}}
+
$ yaourt -G ''package''
 
Build and export package, its sources to a directory:
 
Build and export package, its sources to a directory:
{{bc|$ yaourt -Sb --export <dir> <package>}}
+
$ yaourt -Sb --export ''dir'' ''package''
 
Backup database:
 
Backup database:
{{bc|$ yaourt -B}}
+
$ yaourt -B
 
Query backup file:
 
Query backup file:
{{bc|$ yaourt -Q --backupfile <file>}}
+
$ yaourt -Q --backupfile ''file''
  
 
See also: [[Pacman]] and [[Pacman Tips]].
 
See also: [[Pacman]] and [[Pacman Tips]].
  
==Persistent Local Source Repositories==
+
== Persistent local source repositories ==
By default, yaourt will pull remote repositories for building to /tmp. To avoid having to refetch whole repositories whenever AUR packages update, you can change this directoy by uncommenting and setting DEVELBUILDDIR in yaourtrc to wherever you want source repositories pulled to. Note this will only apply to devel packages, usually suffixed by -git or -svn.
+
 
 +
By default, yaourt will pull remote repositories for building to /tmp. To avoid having to refetch whole repositories whenever AUR packages update, you can change this directoy by uncommenting and setting {{ic|DEVELBUILDDIR}} in yaourtrc to wherever you want source repositories pulled to. Note this will only apply to devel packages, usually suffixed by -git or -svn.
 
{{hc|/etc/yaourtrc|DEVELBUILDDIR&#61;"/var/abs/local/yaourtbuild"}}
 
{{hc|/etc/yaourtrc|DEVELBUILDDIR&#61;"/var/abs/local/yaourtbuild"}}
  
==Troubleshooting==
+
== Troubleshooting ==
 +
 
 +
=== Yaourt asking for password twice ===
  
===Yaourt asking for password twice===
 
 
If you disable the {{ic|sudo}} password timeout by adding
 
If you disable the {{ic|sudo}} password timeout by adding
 
  Defaults timestamp_timeout=0
 
  Defaults timestamp_timeout=0
Line 95: Line 99:
 
to {{ic|/etc/yaourtrc}} or to {{ic|~/.yaourtrc}}
 
to {{ic|/etc/yaourtrc}} or to {{ic|~/.yaourtrc}}
  
===Yaourt freezing / system heavy slowdown===
+
=== Yaourt freezing / system heavy slowdown ===
Mostly a problem for systems with less RAM or a smaller swap space. Yaourt uses /tmp to compile in by default. By default this is all in RAM as it's a tmpfs. Change the location in {{ic|/etc/yaourtrc}} (uncomment "TMPDIR = " line) to somewhere else to avoid clogging up your system.
+
 
 +
Mostly a problem for systems with less RAM or a smaller swap space. Yaourt uses /tmp to compile in by default. By default this is all in RAM as it's a tmpfs. Change the location in {{ic|/etc/yaourtrc}} (uncomment {{ic|TMPDIR &#61;}} line) to somewhere else to avoid clogging up your system.
  
 +
=== Yaourt freezing during PKBUILD download ===
  
===Yaourt freezing during PKBUILD download===
 
 
If you are using IPv6 connectivity there may be some problems with connecting to IPv4 AUR address.
 
If you are using IPv6 connectivity there may be some problems with connecting to IPv4 AUR address.
 
To solve this, add to {{ic|/etc/hosts}} following line:
 
To solve this, add to {{ic|/etc/hosts}} following line:
 
  78.46.78.247 aur.archlinux.org aur
 
  78.46.78.247 aur.archlinux.org aur
 
(as for 2013-10-14)
 
(as for 2013-10-14)

Revision as of 09:46, 1 November 2013

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary link Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary end

Yaourt (Yet AnOther User Repository Tool; French for 'Yogurt') 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.

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

Installation

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 AUR 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.

Alternatively you can add the archlinuxfr repository as described on the yaourt homepage.

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 use visudo command to edit /etc/sudoers and add:

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

Using yaourt

You can install packages (including AUR packages) with

$ yaourt packagename

You can update your system including AUR packages with:

$ yaourt -Syua

See the yaourt manual page for more information.

Examples

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 -Syua --devel 

Build package from source:

$ yaourt -Sb package

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

$ yaourt -C

Get a PKGBUILD (support split 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.

Persistent local source repositories

By default, yaourt will pull remote repositories for building to /tmp. To avoid having to refetch whole repositories whenever AUR packages update, you can change this directoy by uncommenting and setting DEVELBUILDDIR in yaourtrc to wherever you want source repositories pulled to. Note this will only apply to devel packages, usually suffixed by -git or -svn.

/etc/yaourtrc
DEVELBUILDDIR="/var/abs/local/yaourtbuild"

Troubleshooting

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:

SUDONOVERIF=1

to /etc/yaourtrc or to ~/.yaourtrc

Yaourt freezing / system heavy slowdown

Mostly a problem for systems with less RAM or a smaller swap space. Yaourt uses /tmp to compile in by default. By default this is all in RAM as it's a tmpfs. Change the location in /etc/yaourtrc (uncomment TMPDIR = line) to somewhere else to avoid clogging up your system.

Yaourt freezing during PKBUILD download

If you are using IPv6 connectivity there may be some problems with connecting to IPv4 AUR address. To solve this, add to /etc/hosts following line:

78.46.78.247 aur.archlinux.org aur

(as for 2013-10-14)