Quantcast
Channel: 可丁丹尼 @ 一路往前走2.0
Viewing all articles
Browse latest Browse all 79

Arch Linux安裝Yaourt非官方套件管理員

$
0
0

Arch Linux安裝Yaourt非官方套件管理員

Yaourt(Yet AnOther User Repository Tool)是基於pacman的外殼(前導程式),它外加了AUR的支持,幫助使用者從AUR上下載軟件的相關訊息的PKGBUILD再經過makepkg產生安裝套件的準備工作,最後利用pacman完成安裝,省下許多步驟,接下來會說明一下安裝方式,雖然官方已經有完整的安裝教學,不過還是依照Danny親身安裝完成的方式說明一下。

設定pacman.conf

安裝之前必需設定內容,將AUR加入才能利用pacman安裝Yaourt,否則要使用手動安裝的方式先將PKGBUILD資訊下載後並建立環境再手動使用pacman安裝,開啟/etc/pacman.conf並加入:

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

此設定使用cn的伺服器,依照你的速度可以另外加其他伺服器,加入完成後將以下內容的註解(#)取消:

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

加入鏡象伺服器,避免過程中有問題時可以利用其他的伺服器當備援。

安裝base-devel

未來一些經過AUR伺服器下載回來的可能是原始碼要進行直接編譯成可執行程式時就需要base-devel 群組套件,它是經過官方所整理出來的套件群組(Group)先來看看內容有包含什麼:

群組套件的好處是一次就將相關的套件都安裝完成,你的環境需要有開發環境時安裝此群組套件,其他群組套件參照官方網站 Group Details,現在進行安裝:

pacman -Sy --needed base-devel

註:參數y找最新的套件安裝;--needed需要時再重新安裝

安裝Yaourt

經過上述的修改與新增設定後就能透過pacman安裝Yaourt

pacman -S yaourt

耐心等待一段時間後就能將Yaourt安裝完成,此時執行幫助了解它的參數:

yaourt -h

[danny@nb-a1410 /]$ yaourt -h
Usage: yaourt <operation> [...]
operations:
    yaourt (search pattern|package file)
    yaourt {-h --help}
    yaourt {-V --version}
    yaourt {-Q --query}       [options] [package(s)]
    yaourt {-R --remove}      [options] <package(s)>
    yaourt {-S --sync}        [options] [package(s)]
    yaourt {-U --upgrade}     [options] <package(s)>
    yaourt {-C --clean}       [options]
    yaourt {-B --backup}      [save directory|restore file]
    yaourt {-G --getpkgbuild} [options] <package(s)>
    yaourt {--stats}
[danny@nb-a1410 /]$


其中有options參數不在幫助說明中,必需要使用man了解細節:

man yaourt

YAOURT(8)                                                                                                     Yaourt Manual                                                                                                    YAOURT(8)

NAME
       yaourt - more than a frontend to pacman

SYNOPSIS
       yaourt <operation> [options] [packages]

       yaourt (search pattern|package file)

DESCRIPTION
       Yaourt is a pacman frontend with a lot of features.

       AUR/ABS support, colorized output, interactive search/install, save/restore Alpm database, orphans detection, manage .pac* files, ...

OPERATIONS
       Since the majority of those options are the same as pacman’s (pacman(8)), this manual page will focus on the yaourt-specific ones.

       -B, --backup
           Backup or restore alpm local database. See Backup Options.

       -C
           Manage .pac* files. See Clean Options.

       -G, --getpkgbuild <package>
           Get PKGBUILD for ABS or AUR.

       -Q, --query
           Query local database + Can sort packages by installation date, possibility to delete orphans. See Query Options.

       -R, --remove
           Remove package(s) from the system.

       -U, --upgrade
           Upgrade or add package(s) to the system.

       -S, --sync
           Synchronize packages + AUR support, building from sources. See Sync Options.

       --stats
           Show some statistics about your packages.

       -V, --version
           Display version and exit.

       -h, --help
           Display a short help.

OPTIONS
       --color
           Force color.

       --export <dir>
           Export built packages and their sources (makepkg(8)) to <dir>.

       --force
           Force installation or updates.

       --insecure
           Allow curl & package-query to perform "insecure" SSL connections

       --nocolor
           Disable color.

       --noconfirm
       --pager
           Use $PAGER to show search results.

       --tmp <dir>
           Use <dir> as temporary folder. default to /tmp

BACKUP OPTIONS
       yaourt -B
           Backup alpm local database in current dir.

       yaourt -B <dir>
           Backup alpm local database in <dir>/pacman-date.tar.bz2

       yaourt -B <file>
           Restore alpm local database from <file>.

CLEAN OPTIONS
       Manage .pacnew, .pacsave and .pacorig files.

       -c, --clean
           Clean all these files.

QUERY OPTIONS
       --backupfile <file>
           Query <file> instead of alpm/aur.

       --date
           List queries result sorted by installation date.

       -d, --deps
           Filter output to packages installed as dependencies.

       -t, --unrequired
           Filter output to packages not required by any currently installed package. With -d, yaourt list all real orphans and ask for deletion.

SYNC OPTIONS
       -a, --aur
           Also search in AUR database. With -u or --sysupgrade, upgrade aur packages that are out of date. With -Qm, display more info about foreign package.

       -A, --ignorearch
           Pass -A or --ignorearch option to makepkg(8) to ignore PKGBUILD(5) arch field.

       --aur-url <AUR url>
           Specify a custom AUR url (default to https://aur.archlinux.org).

       --conflicts
           Show packages that conflicts with one of the targets.

       -b, --build
           Build from sources, ABS for official packages, or AUR if packages is not found. Specify this option twice to build all dependencies.

       --depends
           Show packages that depends on one of the targets.

       --devel
           With -u or --sysupgrade, search an update for devel packages.

       -i, --info
           Display dependency and other information for a given package. This will search through all repositories and AUR database for a matching package.

       --m-arg <opts>
           Pass additional options to makepkg(8). To pass more than one option, put them in quotes.

       --provides
           Show packages that provides one of the targets.

       --replaces
           Show packages that replaces one of the targets.

       -u, --sysupgrade
           Upgrade all packages that are out of date.

HANDLING CONFIG FILES
       With AUTOSAVEBACKUPFILE (yaourtrc(5)), yaourt will search and save all files marked as backup. These files can be used later with yaourt -C to automerge current configuration files with new ones.

CONFIGURATION
       See yaourtrc(5) for more details on configuring yaourt using the yaourtrc file.

ENVIRONMENT VARIABLES
       MAKEPKG
           Set an alternative makepkg(8) command.

       PACMAN
           Set an alternative pacman(8) command.

       TMPDIR
           Set a temporary folder to use.

       YAOURT_COLORS
           Set a user defined colors. (see package-query(8))

SEE ALSO
       yaourtrc(5), makepkg(8), pacman(8)

       See the yaourt website at http://archlinux.fr/yaourt-en/ for more info.

BUGS
       https://github.com/archlinuxfr/yaourt

AUTHORS
       Julien MISCHKOWITZ <wain@archlinux.fr>

       Current maintainers:

       Tuxce <tuxce.net@gmail.com>

       Skunnyk <skunnyk@archlinux.fr>

Yaourt 1.6                                                                                     

Yaourt 安裝AUR套件

在寫此文時,印象中haroopad也有Linux版本,不過上官網才知它只提供rpmdeb的安裝方式,並無給archlinux用的,不過利用指令查詢結後已經有網友提供安裝套件 :

yaourt -Ss haroopad

查詢結果:

[danny@nb-a1410 /]$ yaourt -Ss haroopad
aur/haroopad 0.13.1-4
    A markdown enabled document processor
[danny@nb-a1410 /]$

yaourt必需在非root帳號上執行,過程中會需要輸入sudo密碼:

yaourt -S haroopad

自動下載相關檔案並進行編譯

安裝過程一樣需要一段時間,等待安裝完成後就能看到應用程式:


Viewing all articles
Browse latest Browse all 79

Trending Articles