在 ArchLinux 上安裝 yaourt

底下資料引自 Yaourt (正體中文) – ArchWiki
Yaourt (Yet AnOther User Repository Tool),是 pacman 的一個外殼。在 pacman 的基礎上,它增加了對 AUR 支持,幫助用戶輕鬆從 AUR 的海量套件中選擇需要的軟體進行編譯安裝。

安裝編譯時所須套件
# pacman -S –needed base-devel
:: There are 25 members in group base-devel:
:: Repository core
   1) autoconf  2) automake  3) binutils  4) bison  5) fakeroot  6) file  7) findutils  8) flex  9) gawk  10) gcc
   11) gettext  12) grep  13) groff  14) gzip  15) libtool  16) m4  17) make  18) pacman  19) patch
   20) pkg-config  21) sed  22) sudo  23) texinfo  24) util-linux  25) which

Enter a selection (default=all):[@more@]
建立一個 root 之外的使用者
# useradd -m -g users -s /bin/bash pi

設定 pi 的密碼
# passwd pi

將 pi 加入可以執行 sudo
# visudo

root ALL=(ALL) ALL
後面加入
pi ALL=(ALL) ALL

切換成為 pi
# su pi

切換到 pi 的家目錄
# cd /home/pi
ArchLinux  AUR 網站
下載 yaourt
$ wget https://aur.archlinux.org/packages/ya/yaourt/yaourt.tar.gz
解壓縮
$ tar xvzf yaourt.tar.gz
切換目錄
$ cd yaourt
進行套件編譯及打包
$ makepkg
==> Making package: yaourt 1.5-1 (Sun Oct  5 13:06:17 CST 2014)
==> Checking runtime dependencies…
==> Missing dependencies:
  -> package-query>=1.4
==> Checking buildtime dependencies…
==> ERROR: Could not resolve all dependencies.

好像缺少了 package-query 套件
使用 pacman -Ss 指令查詢,發現沒有 package-query 這一個套件
$ sudo pacman -Ss package-query

ArchLinux  AUR 網站
下載 package-query
$ wget https://aur.archlinux.org/packages/pa/package-query/package-query.tar.gz
解壓縮
$ tar xvzf package-query.tar.gz
切換目錄
$ cd package-query
進行套件編譯及打包
$ makepkg
==> Making package: package-query 1.4-1 (Sun Oct  5 13:23:51 CST 2014)
==> Checking runtime dependencies…
==> Missing dependencies:
  -> yajl>=2.0
==> Checking buildtime dependencies…
==> ERROR: Could not resolve all dependencies.

好像缺少了 yajl
使用 pacman -Ss 可以查詢的到
$ sudo pacman -Ss yajl
extra/yajl 2.1.0-1
    Yet Another JSON Library

直接進行安裝
$ sudo pacman -S yajl
再進行一次 套件編譯及打包
$ makepkg
進行套件安裝
$ sudo pacman -U /home/pi/package-query/package-query-1.4-1-armv6h.pkg.tar.xz

可以編譯完成後安裝
$ makepkg -si

切換回 ../yaourt 目錄
$ cd ../yaourt
再進行一次 套件編譯及打包
$ makepkg
進行套件安裝
$ sudo pacman -U /home/pi/yaourt/yaourt-1.5-1-any.pkg.tar.xz