标题:如何设置自己的共享库目录?/etc/ld.so.conf 出处:向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除 时间:Wed, 27 Jan 2010 20:29:40 +0000 作者:jackxiang 地址:https://jackxiang.com/post/2651/ 内容: 如何设置自己的共享库目录?/etc/ld.so.conf下增加了路径,还执行了ldconfig后,还提示没找到*.so? 真是烦啊,以前也没在其他版本的linux下搞过这东西,不会是magic的问题吧? 搜索了一天,都是怎么教人设定共享库的啊 /etc/ld.so.conf 是添加一行: /my/lib 此目录已经建立了,而且把相关的so文件也放进去了 接着 #ldconfig 在安装东西,还是提示没有找到那几个so文件 重起也不行,但要是把这些so拷到/usr/lib下就不会出现说找不到它们 大老们具体说你们是怎么解决这个自设共享库目录的???? 谢了先~!~@! 缘起: 同样叫回忆未来,难免看看他的文章,实验实验,在实验 基于HTTP协议的轻量级开源简单队列服务:HTTPSQS[原创],发现: [root@localhost httpsqs-1.1]# /usr/bin/httpsqs -h /usr/bin/httpsqs: error while loading shared libraries: libtokyocabinet.so.9: cannot open shared object file: No such file or directory 于是看留言也有这个问题: # httpsqs httpsqs: error while loading shared libraries: libtokyocabinet.so.9: cannot open shared object file: No such file or directory 安装完后出现这个哦。centos5.3 32位系统 张宴 回复于 2009-12-31 17:39 这个是tokyocabinet动态链接库找不到的问题。你可以按照以下步骤解决: 1、确认tokyocabinet是否安装成功(查看/usr/local/lib/libtokyocabinet.so.9文件是否存在) 2、如果存在,还是报这个错误,将/usr/local/lib添加到/etc/ld.so.conf文件中,然后在命令行执行/sbin/ldconfig,最后启动httpsqs 这么回事: [root@localhost httpsqs-1.1]# vi /etc/ld.so.conf include ld.so.conf.d/*.conf /usr/local/lib [root@localhost httpsqs-1.1]# ldconfig [root@localhost httpsqs-1.1]# /usr/bin/httpsqs -h -------------------------------------------------------------------------------------------------- HTTP Simple Queue Service - httpsqs v1.1 Author: Zhang Yan (http://blog.s135.com), E-mail: net@s135.com This is free software, and you are welcome to modify and redistribute it under the New BSD License -l interface to listen on, default is 0.0.0.0 -p TCP port number to listen on (default: 1218) -x database directory (example: /opt/httpsqs/data) -t timeout for an http request (default: 1) -d run as a daemon -h print this help and exit Use command "killall httpsqs", "pkill httpsqs" and "kill PID of httpsqs" to stop httpsqs. Please note that don't use the command "pkill -9 httpsqs" and "kill -9 PID of httpsqs"! Please visit "http://code.google.com/p/httpsqs" for more help information. -------------------------------------------------------------------------------------------------- 我的原则就是:从来在模仿,从未被超越,呵呵。 HTTPSQS 如队列和出队列: curl "http://localhost:1218/?name=your_queue_name&opt=put&data=经过URL编码的文本消息" curl "http://localhost:1218/?charset=utf-8&name=your_queue_name&opt=get" http://blog.s135.com/httpsqs/#entrymore Generated by Jackxiang's Bo-blog 2.1.1 Release