LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1079|回复: 6

请教prefix的一个问题

[复制链接]
发表于 2006-9-3 23:23:49 | 显示全部楼层 |阅读模式
chap6里面的:

../glibc-2.3.4/configure --prefix=/usr \
    --disable-profile --enable-add-ons \
    --enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc

意思是安装库到/usr中去,但是随后的一节adjust好像说的是库在/lib中,
这事怎么回事阿?

thanks a lot
 楼主| 发表于 2006-9-6 12:14:05 | 显示全部楼层
问题不引大家兴趣埃,好像是太简单了,呵呵。。结贴


一些参考:



well, both books LFS/BLFS say it's "your distro, your rules"
BLFS just gives you a wide varitey of options to choose from.
putting everything in --prefix=/usr just helps to keep things organized
and keep the main "system" files clean..........
you can always use --prefix=/opt/usr if you want further organize
your own programs.......
  




It keeps things simple if you install everything in /usr. If you install stuff elsewhere you then have to add that to /etc/ld.so.conf and extend your $PATH and $PKG_CONFIG_PATH to include the new files. It all gets too confusing for my little brain. Keep it simple, works for me.






EDIT: FWIW I use /usr in general, /opt for anything precompiled - Firefox, Open Office, Acrobat Reader and Java (lazy I know) - and /usr/local for testing before I put it into /usr.
回复 支持 反对

使用道具 举报

发表于 2006-9-6 13:16:21 | 显示全部楼层
I use /usr in general, /opt for anything precompiled - Firefox, Open Office, Acrobat Reader and Java (lazy I know) - and /usr/local for testing before I put it into /usr

基本上也是我的原则。。。
回复 支持 反对

使用道具 举报

发表于 2006-9-6 22:54:58 | 显示全部楼层
就是啊,如楼主所言的地方
在把glibc装好后,ldconfig和sln两个程序会被装到/sbin目录下,另外有些库也被装到/lib下,这里/sbin和/lib没有指定啊
那么在第五章中装glibc到/tools中时,有没有把ldconfig和sln装在/sbin把有些库装在/lib(这时/sbin和/lib还在宿主机上面了)?
回复 支持 反对

使用道具 举报

发表于 2006-9-7 00:09:19 | 显示全部楼层
hmm,,当年考虑过这个问题,后来也不了了之了。。。

我想的是:如果 prefix 指定为 /usr 的话,就会把部分库放入 /lib,如果不是的话,那么就全部放入相应的 /prefix 里边。。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-9-7 15:37:41 | 显示全部楼层
glibc文档的解释:
GNU/Linux expects some components of the libc installation to be in
`/lib' and some in `/usr/lib'.  This is handled automatically if you
configure glibc with `--prefix=/usr'.  If you set some other prefix or
allow it to default to `/usr/local', then all the components are
installed there.

翻译:
如果指定prefix为/usr,则会安装glibc的组件到/lib和/usr/lib中,
如果指定为/usr/local,则只会安装到/usr/local/lib中

楼上正解~~~
回复 支持 反对

使用道具 举报

发表于 2006-9-8 09:25:22 | 显示全部楼层
向jinglexy学习!
幻想老大不用查glibc文档自己能想出来,强!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表