| FreeBSD handbook中文版 4 安装应用程序:Packages 和Ports |
 |
作者: 来源: 日期:2007-6-14 10:27:34 点击次数: |
|
第7 页FreeBSD 使用手册 方法,最容易的方法是到FreeBSD 的网站上查看ports 的列表。每个port 都有一个描述文 件,你需要在安装之前先浏览一下。另外一种方法是使用whereis 命令。只需要输入“whereis <你想安装的程序>”,如果能被系统找到,你就会看到它的保存路径: #whereis xchat xchat: /usr/ports/irc/xchat # 这个命令告诉你xchat 能在/usr/ports/irc/xchat 目录中找到。另外一种查找port 的 方法是使用ports 内建的搜索功能。要使用这个功能,你先要进入/usr/ports 目录,然后 运行make search key=program-name ,这里的program-name 就是你要找的程序的名称。 例如,如果你要找xchat: # cd /usr/ports # make search key=xchat Port: xchat-1.3.8 Path: /usr/ports/irc/xchat Info: An X11 IRC client using the GTK+ toolkit, and optionally, GNOME Maint: jim@FreeBSD.org Index: irc B-deps: XFree86-3.3.5 bzip2-0.9.5d gettext-0.10.35 giflib-4.1.0 glib-1.2.6 gmake-3.77 gtk-1.2.6 imlib-1.9.8 jpeg-6b png-1.0.3 tiff-3.5.1 R-deps: XFree86-3.3.5 gettext-0.10.35 giflib-4.1.0 glib-1.2.6 gtk-1.2.6 imlib-1.9.8 jpeg-6b png-1.0.3 tiff-3.5.1 你要密切注意输出内容的“Path:”行,它告诉你能在哪儿找到它。其它的信息是在安 装ports 时不需要的,在这里就不提了。 注意: 必须具有root 权限才能安装port。 4.4.2.1.从CDROM 安装ports 做这一步的前提是你有一张FreeBSD 的安装光盘。如果你没有,你可以从FreeBSD 商店 订购一张(www.freebsdmall.com)。在确信光盘已经放入光驱之后,你需要先挂上/cdrom, 才可以安装ports。开始,改变目录到你要安装的ports 所在的目录: 第8 页FreeBSD 使用手册 # cd /usr/ports/irc/xchat 一旦进入xchat 目录,你就可以看到port skeleton 文件了。下面要编译port。只需 要在命令行简单地输入make 命令。做好之后,你可以看到下面的信息: # make >> xchat-1.3.8.tar.bz2 doesn’t seem to exist on this system. >> Attempting to fetch from file:/cdrom/ports/distfiles/. ===> Extracting for xchat-1.3.8 >> Checksum OK for xchat-1.3.8.tar.bz2. ===> xchat-1.3.8 depends on executable: bzip2 - found ===> xchat-1.3.8 depends on executable: gmake - found ===> xchat-1.3.8 depends on shared library: gtk12.2 - found ===> xchat-1.3.8 depends on shared library: Imlib.5 - found ===> xchat-1.3.8 depends on shared library: X11.6 - found ===> Patching for xchat-1.3.8 ===> Applying FreeBSD patches for xchat-1.3.8 ===> Configuring for xchat-1.3.8 ... [configure output snipped] ... ===> Building for xchat-1.3.8 ... [compilation snipped] ... # 注意,一旦编译完成,你需要回到你的命令行。下面就安装port,在命令行输入make install: # make install ===> Installing for xchat-1.3.8 ===> xchat-1.3.8 depends on shared library: gtk12.2 - found ===> xchat-1.3.8 depends on shared library: Imlib.5 - found 第9 页FreeBSD 使用手册 ===> xchat-1.3.8 depends on shared library: X11.6 - found ... [install routines snipped] 上一篇:FreeBSD handbook中文版 3 Unix 基础 下一篇:FreeBSD handbook中文版 5 X Window 系统 |
|
|
 |
| 北京总部: 4006-505-808 |
| 天 津 部: 4006-505-808 |
| 上 海 部: 4006-505-808 |
| 深 圳 部: 4006-505-808 |
| 广 州 部: 4006-505-808 |
| 重 庆 部: 4006-505-808 |
| 南 京 部: 4006-505-808 |
| 其它地区: 4006-505-808 | |
|
 |
|