Linux 安装库 (ICU) 问题
我是安装库的相对菜鸟。我的系统当前有旧版本的 ICU 库 (3.8) 我想要最新的 (4.4) )。
按照 ICU readme.html 中的步骤操作,一切顺利(echo $? 每一步都会生成全 0)。我看到该库已安装到 /usr/local/lib 中。但是,该库的当前版本安装在 /usr/lib 中。
我的问题。
1) 这两个地点之间是否存在“组织”或其他显着差异?
2)如何将新库的安装路径更改为/usr/lib?
3) 库位于错误的位置是否是我运行 ICU 目录中的示例时出现“加载共享库时出错:libicui18n.so.44”的原因?
谢谢大家。
I'm a relative noob to installing libraries. My system currently has an older version of the ICU library (3.8) and I want to go the latest (4.4).
Following the steps in the ICU readme.html, everything goes fine (echo $? produces all 0 for every step). And I see the libary was installed to /usr/local/lib. However the current version of the library is is installed in /usr/lib.
My questions.
1) Is there an "organzational" or some other significant difference between these two locations?
2) How can I change the install path for the new library to /usr/lib?
3) Is the library being in the wrong location the reason why when I run even the samples in the ICU directory, I get "error while loading shared libraries: libicui18n.so.44"?
Thanks all.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
另一个问题是,如果您有 x86_64 系统,64 位库的正确库路径是 /usr/local/lib64 而不是 /usr/local/lib。在这种情况下,在构建 ICU 时将
--libdir=/usr/local/lib64
添加到./configure
命令行。Another wrinkle is that if you have an x86_64 system, the correct library path for 64 bit libraries is /usr/local/lib64 not /usr/local/lib. In this case add
--libdir=/usr/local/lib64
to the./configure
command line when building ICU.1) 直接位于
/usr
中的内容属于您的发行版,除非通过其包管理器,否则不应修改。/usr/local
中的内容属于本地安装,供您根据需要进行管理。因此,将较新的 libICU 本地安装放在/usr/local/lib
中是正确的。2)您可以通过在构建 ICU 时调整一些设置来做到这一点 - 我无法给您具体建议,因为我不知道 ICU 使用什么构建线束。但是,您不应该这样做,因为这会覆盖发行版的文件,这可能会导致任意可怕的损坏。
3)有点。问题不在于该库安装在错误的位置,而是 /usr/local/lib 不在默认搜索路径中。您可以通过两种方式修复此问题:
使用此 shell 命令暂时为自己修复:
通过将
/usr/local/lib
添加到/etc/ld 中的列表,永久为所有用户提供.so.conf
,然后以 root 身份运行ldconfig
。1) Stuff directly in
/usr
belongs to your distribution and should not be modified except via its package manager. Stuff in/usr/local
belongs to the local installation, and is for you to manage as you see fit. Thus, it is correct to put a local installation of a newer libICU in/usr/local/lib
.2) You can do this by adjusting some settings when you build ICU - I can't give you specific advice because I don't know what build harness ICU uses. However, you should not do this, because that will overwrite the distribution's files, which can cause arbitrarily horrible breakage.
3) Sort of. The problem is not that the library was installed in the wrong place, but that
/usr/local/lib
isn't in the default search path. You can fix this two ways:temporarily for yourself with this shell command:
permanently for all users, by adding
/usr/local/lib
to the list in/etc/ld.so.conf
and then runningldconfig
as root.