总结一下最近遇到的几个问题:
gm: error while loading shared libraries: libGraphicsMagick.so.3: cannot open shared object file: No such file or directory
httpd: Syntax error on line 202 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_dav_svn.so into server: /usr/local/lib/libsvn_subr-1.so.0: undefined symbol: apr_hash_clear
原因可以归结为一句话:程序没有找到动态链接库,虽然这个动态链接库存在,但是默认情况下,编译器只会使用/lib和/usr/lib这两个目录下的库文件。
比如:undefined symbol: apr_hash_clear,因为我的apr手动安装在/usr/local/apr下,apr的lib的完整目录是/usr/local/apr/lib,需要vi /etc/ld.so.conf,添加 /usr/local/apr/lib 行,保存后执行ldconfig即可!
具体可以参考:
http://blog.csdn.net/hairetz/article/details/6367212
http://www.cppblog.com/true/archive/2012/05/29/20667.html
http://hi.baidu.com/vv1133/item/c176e8e22339ddafcf2d4fa8