Chinaunix

标题: ar program为何物?? [打印本页]

作者: jifeng_1982    时间: 2008-07-08 10:05
标题: ar program为何物??
我用源代码编译方式安装bind,再进行./configure --prefix=/usr/local/bind的时候出现现面提示

……

configure :error:

ar program not found.Please fix your PATH to include the directory in which ar resides ,or set AR in the erviroment with the full path to ar.

请教各位高手,ar program是什么东西,怎么解决???
作者: lipingtababa    时间: 2008-07-08 10:17
ar 是用来把object 文件打包成libxxx.a的工具。
作者: jifeng_1982    时间: 2008-07-08 10:21
标题: 回复 #2 lipingtababa 的帖子
那我这样的情况,是缺少那个ar工具吗?如何解决这个问题啊?急
作者: lipingtababa    时间: 2008-07-08 11:12
ar program not found.Please fix your PATH to include the directory in which ar resides ,or set AR in the erviroment with the full path to ar.

你看不懂这句话?就是你要把ar所在的目录添加到PATH环境变量里。
你可以用 find / -name ar找出ar所在的目录
作者: jifeng_1982    时间: 2008-07-08 11:27
标题: 回复 #4 lipingtababa 的帖子
不好意思,我是个新手啦~~
find / -name ar 后出现这些:
/usr/ccs/bin/ar
/usr/lib/vfs/2.0/extfs/ar
/usr/openwin/lib/locale/ar
/usr/share/gok/ar
/usr/xpg4/bin/ar
/usr/sfw/i386-sun-solaris2.10/bin/ar
/usr/dt/config/ar
/usr/X11/lib/X11/xkb/symbols/pc/ar
/usr/X11/lib/X11/xkb/symbols/ar
/usr/staroffice7/share/cde/types/ar

然后该怎么做呢?是选择呢个正确的目录呢?
作者: nimysun    时间: 2008-07-08 11:39
原帖由 jifeng_1982 于 2008-7-8 11:27 发表
不好意思,我是个新手啦~~
find / -name ar 后出现这些:
/usr/ccs/bin/ar
/usr/lib/vfs/2.0/extfs/ar
/usr/openwin/lib/locale/ar
/usr/share/gok/ar
/usr/xpg4/bin/ar
/usr/sfw/i386-sun-solaris2.10/ ...

/usr/ccs/bin/ar
作者: jifeng_1982    时间: 2008-07-08 11:55
标题: 回复 #6 nimysun 的帖子
是否PATH=/usr/ccs/bin/ar ?
之后我进行./configure --prefix=/usr/local/bind
出现:./configure: chmod: not found
./configure: rm: not found
./configure: expr: not found
./configure: false: not found
./configure: false: not found
./configure: sed: not found
./configure: line 75: chmod: command not found
./configure: line 81: rm: command not found
./configure: line 194: sed: command not found
./configure: line 457: expr: command not found
./configure: line 469: sed: command not found
./configure: line 483: sed: command not found
: error: cannot create .lineno; rerun with a POSIX shell
我的shell是/usr/bin/bash
作者: niupigege    时间: 2008-07-08 12:21
PATH=$PATH:/usr/ccs/bin/
作者: jifeng_1982    时间: 2008-07-08 12:39
谢谢,之后重新运行./configure --prefix=/usr/local/bind后出现以下:
checking build system type... i386-pc-solaris2.10
checking host system type... i386-pc-solaris2.10
checking whether make sets $(MAKE)... yes
checking for ranlib... ranlib
checking for a BSD-compatible install... ./install-sh -c
checking whether ln -s works... yes
checking for ar... /usr/ccs/bin//ar
checking for etags... no
checking for emacs-etags... no
checking for perl5... no
checking for perl... /usr/bin/perl
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

是不是编辑器有问题啊?
作者: niupigege    时间: 2008-07-08 13:51
兄弟,问题一样,你的编译器的路径没有出现在PATH里面
作者: nimysun    时间: 2008-07-08 16:55
在你configure之前,要保证which gcc, which ar等命令都不会抱怨Command not found




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2