2010年3月26日星期五

arch yaourt安装(转)

转:http://wiki.archlinux.org/index.php/Yaourt_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)
Contents [hide]
1 安装 Yaourt
2 简便的安装
3 PKGBUILD 安装
4 使用 Yaourt
4.1 查找并调用pacman安装软件包=
安装 Yaourt
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 8000+ 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.
Yaourt是archlinux方便使用的关键部件之一,但没有被整合到系统安装中的工具。建议在装完系统重启之后,更新完pacman和基本系统之后,就安装这个工具。 安装方法有下面两种:建议使用第一种,如果要体验AUR的操作过程和使用方法,建议使用第二种方法安装。
简便的安装
最简单安装Yaourt的方式是添加Yaourt源至您的 /etc/pacman.conf:
i686架构:
[archlinuxfr]
Server = http://repo.archlinux.fr/i686
x86-64架构:
[archlinuxfr]
Server = http://repo.archlinux.fr/x86_64
同步并安装:
pacman -S yaourt
下面过程并非必须:如果您乐意,可以创建自己的命令的别名通过添加至~/.bashrc: 用nano打开~/.bashrc(或者用其他编辑器)。添加如下别名:
alias p="pacman"
alias y="yaourt"
保存并使用source命令
source ~/.bashrc
PKGBUILD 安装
传统安装Yaourt的方式是通过AUR,用这种方式安装Yaourt,你就有机会了解到AUR(和PKGBUILD)是如何工作的。
打开网页浏览器并访问yaourt AUR page
下载Yaourt的tarball包。 tarball
解压tarball
tar zxvf yaourt.tar.gz
切换至新的目录
cd yaourt
这时候;确认您已经检查了PKGBUILD和yaourt.intall 的内容! 别担心,它们并不是很复杂,仅仅是看一下而已。如果你觉得某些可疑的东西,到irc上或者论坛上询问一下。
more yaourt.install
more PKGBUILD
如果一切正常,我们已经准备好来构建软件包了。
makepkg PKGBUILD
这一过程结束后,您讲会看到一些新的文件和目录。您应该对那些以*.pkg.tar.gz的后缀名的文件感兴趣(在这特定的情况下;yaourt-0.9.2-i686.pkg.tar.gz)
现在是时候用pacman来安装yaourt了。一定要用实际的软件包名字,而不是 拷贝这如下一行“
pacman -U yaourt-0.9.2-i686.pkg.tar.gz
恭喜!您已经成功的安装了Yaourt!请记住,对于大多数的AUR里面的PKGBUILDS, 您都可以用类似上面的方式来安装。
使用 Yaourt
查找并调用pacman安装软件包=
yaourt可用于查找软件包(包括core extra community aur的软件包,pacman只能查找非aur的软件包),假设我们要安装opera-china-qt3(opera中文版,主要解决了opera的中文字体问题)。但我们只记得opera名称,使用yaourt可以查找和这名称相关的软件包。opera-china-qt3位于aur中,需要用这种方式来安装。下面三条命令任选其一即可。
yaourt opera
yaourt opera-china
yaourt -S opera-china-qt3 (如果名称知道,可用这条命令直接安装位于aur中的该软件)
查找结果会有好多个相关项,按提示,输入所要的软件的数字序号,按enter继续,根据提示,可以选择编辑或者不编辑PKGBUILDS文件,根据提示,最后完成安装。

请访问 yaourt man page 以获取更多信息。

没有评论: