Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3335284
  • 博文数量: 815
  • 博客积分: 12898
  • 博客等级: 上将
  • 技术积分: 7883
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-25 09:57
文章分类

全部博文(815)

文章存档

2014年(1)

2011年(46)

2010年(192)

2009年(121)

2008年(70)

2007年(385)

分类: BSD

2007-05-20 21:32:18

Ports的安装被设置成简单的make和make install了。下面就是怎么安装X11 程序xfig 的例子。你会注意到依赖包被自动发现并完成下载安装。
首先你需要cd到你安装的程序的目录。如果你查找某程序,你也可以更新你的locate database或者使用上面提到的search功能。一旦你进入了安装程序所在的目录,你只要输入make install,如:
$ sudo make install
===> Checking files for xfig-3.2.4
>> xfig.3.2.4.full.tar.gz doesn't seem to exist on this system.
>> Attempting to fetch /usr/ports/distfiles/xfig.3.2.4.full.tar.gz from
ww.xfig.org/xfigdist/.
100% |**************************************************| 5042 KB 00:31
>> Checksum OK for xfig.3.2.4.full.tar.gz. (sha1)
===> xfig-3.2.4 depends on: jpeg.62 - jpeg.62 missing...
===> Verifying install for jpeg.62 in graphics/jpeg
===> Checking files for jpeg-6b
>> jpegsrc.v6b.tar.gz doesn't seem to exist on this system.
>> Attempting to fetch /usr/ports/distfiles/jpegsrc.v6b.tar.gz from ftp://ftp.uu
.net/graphics/jpeg/.
'EPSV': command not understood.
100% |**************************************************| 598 KB 00:06
>> Checksum OK for jpegsrc.v6b.tar.gz. (sha1)
===> Extracting for jpeg-6b
===> Patching for jpeg-6b
===> Configuring for jpeg-6b
checking for gcc... cc
checking whether the C compiler (cc -O2 ) works... yes
checking whether the C compiler (cc -O2 ) is a cross-compiler... no
checking whether we are using GNU C... yes
[...snip...]

$ pwd
/usr/ports/net/mtr
$ make show=FLAVORS
no_x11
$ env FLAVOR="no_x11" make
===> mtr-0.49-no_x11 depends on: gmake-3.80 - not found
===> Verifying install for gmake-3.80 in devel/gmake
===> Checking files for gmake-3.80
>> make-3.80.tar.gz doesn't seem to exist on this system.
>> Attempting to fetch /usr/ports/distfiles/make-3.80.tar.gz from ftp://ftp.gnu.
org/gnu/make/.
Unknown command.
100% |**************************************************| 1183 KB 00:07
>> Checksum OK for make-3.80.tar.gz. (sha1)
[...snip...]


使用Flavors:
ports树中的许多应用程序支持不同的安装选项,叫做Flavors.假如某port有多个flavors,在编译该port前,你可以通过简单的设置 环境变量来使用这些选项。假如需要多个选项,FLAVOR可以设置成空格隔开的一些想要的flavors。目前,许多ports有支持数据库、支持没有X 的系统
或者附加的网络属性,比如SSL和IPv6的选项。
$ sudo env FLAVOR="no_x11" make install
===> Faking installation for mtr-0.49-no_x11
[...snip...]
===> Building package for mtr-0.49-no_x11
Creating package /usr/ports/packages/i386/All/mtr-0.49-no_x11.tgz
Using SrcDir value of /usr/ports/net/mtr/w-mtr-0.49-no_x11/fake-i386-no_x11/usr/
local
Creating gzip'd tar ball in '/usr/ports/packages/i386/All/mtr-0.49-no_x11.tgz'
===> Installing mtr-0.49-no_x11 from /usr/ports/packages/i386/All/mtr-0.49-no_a
x11.tgz


列出已安装的ports/packages

你可以使用pkg_info得到已安装的ports和packages的列表:
$ /usr/sbin/pkg_info

bash-2.05b The GNU Borne Again Shell.
阅读(1647) | 评论(0) | 转发(0) |
0

上一篇:openbsd 忘了root口令

下一篇:openbsd 安装bash

给主人留下些什么吧!~~