Skip to content

use yaourt

Kaizhe Huang edited this page Mar 13, 2017 · 10 revisions

Use yaourt in Fedora

0.What is yaourt?

Yaourt (Yet AnOther User Repository Tool) is a wrapper for pacman which adds automated access to the AUR. Yaourt uses the same syntax as pacman.[1] From now, Fedora users can easily use yaourt to install AUR's packages. Thx to @1dot75cm.

Overview

  • AUR support (search, install, check conflict and dependency)
  • Interactive search and install
  • Building packages directly from ABS source
  • Handling backup files: .pac*
  • Save, restore alpm database. Query directly from a backup file.
  • Search orphans and test local database
  • Support splitted packages

1.Installation yaourt

Add FZUG repository, then execute the following command:
$ sudo dnf install yaourt

2.Configuration

Configuration for pacman:

$ sudo vim /etc/pacman.conf
[options]
RootDir = /opt/arch/         # Very important!!! You should create this directory.
DBPath = /opt/arch/var/lib/pacman/    # Database Path
LogFile = /var/log/pacman.log
Architecture = auto

# Add Archlinux's Core、Community、Multilib、Extra、Archlinuxcn repository info
[core]
SigLevel = Optional TrustedOnly
Include = /etc/pacman.d/mirrorlist

[community]
SigLevel = Never
Include = /etc/pacman.d/mirrorlist

[multilib]
SigLevel = Never
Include = /etc/pacman.d/mirrorlist

[extra]
SigLevel = Never
Include = /etc/pacman.d/mirrorlist

[archlinuxfr]
SigLevel = Optional TrustedOnly
Server = http://repo.archlinux.fr/$arch

[archlinuxcn]
SigLevel = Optional TrustedOnly
Server = http://repo.archlinuxcn.org/$arch

sync repository: $ sudo pacman -Sy

using an external download tool:

# vim /etc/pacman.conf  # pacman
XferCommand = /usr/bin/axel -a %u -o %o
# vim /etc/makepkg.conf  # yaourt
DLAGENTS=('http::/usr/bin/axel -a %u -o %o')

3.Install packages

For example, we will be install ppsspp.

$ sudo yaourt -Sdd ppsspp  # skip all dependency version checks
$ sudo yaourt -Qi ppsspp   # view package information, if the lack of dependency, you should use of DNF for installation
$ yaourt-link -s ppsspp  # The related files symbolic links to the system
 link to: /usr/bin/ppsspp
 link to: /usr/share/applications/ppsspp.desktop
 link to: /usr/share/man/man1/ppsspp.1.gz
 link to: /usr/share/pixmaps/ppsspp.svg
Operating finish: community/ppsspp 1.0.1-3

remove ppsspp.

$ yaourt-link -r ppsspp  # remove symbolic links in system
 remove link: /usr/bin/ppsspp
 remove link: /usr/share/applications/ppsspp.desktop
 remove link: /usr/share/man/man1/ppsspp.1.gz
 remove link: /usr/share/pixmaps/ppsspp.svg
Operating finish: community/ppsspp 1.0.1-3
$ sudo yaourt -R ppsspp   # remove ppsspp
$ sudo yaourt -Q   # query installed packages

4.Management multi environments

Sometime, You want to install different packages in different environments. Use yaourt-link to facilitate management.

$ yaourt-link -q  # list all of the domain's config
default
Current: pacman.conf -> /etc/pacman.d/multiconf/default
$ sudo cp /etc/pacman.d/multiconf/default /etc/pacman.d/multiconf/arch1
$ sudo vim /etc/pacman.d/multiconf/arch1
RootDir = /opt/arch1/                 # Very important!!!
DBPath = /opt/arch1/var/lib/pacman/   # Database Path
$ yaourt-link -q                      # list again
arch1  default
Current: pacman.conf -> /etc/pacman.d/multiconf/default
$ yaourt-link -S arch1         # switch to arch1
$ sudo yaourt -Sy                   # sync repository
$ sudo yaourt -Sdd bash; yaourt -Q
core/bash 4.3.039-1 (base)
$ yaourt-link -S default; yaourt -Q  # switch to default
community/ppsspp 1.0.1-3

FAQ:

Q: Why Archlinux's package? Why not Ubuntu?

A: Archlinux strictly abide by the FHS, the file system directory structure is very standard, compatible with Fedora. At the same time, Archlinux and Fedora's development speed is very fast ,the compatibility between them is not guaranteed, these things may eat all of the cheese in your house.YMMV.

Q: How to solve the dependency issues?

A: First, you need execution ldd command for you software. You will be see "libXXX.so.X => no fonund". Then, you need to use DNF to find this library (Ex, dnf provides */libXXX.so.X). Finally, install these packages. If DNF did not find the package, you will be use pacman/yaourt query dependent (yaourt -Qi ppsspp) and install it (yaourt ffmpeg). Finally, use yaourt-link link to the system (yaourt-link -s ffmpeg). The yaourt-link does not overwrite existing files. (Docker may be a better solution)

Happy Hacking! :_)

[1] https://wiki.archlinux.org/index.php/Yaourt