本人也就是查找64bit系统里安装memcached时的问题找到的资料。

引用
LD_DEBUG
The dynamic library loader used in linux (part of glibc) has some neat tricks. One of these is that you can set an environment variable called
LD_DEBUG

to show how symbols (variables and functions, for example) are resolved for a dynamic executable. This can sometimes help resolve obscure bugs where your application isn’t doing what you expect (assuming it is caused by symbols being resolved differently to what you were expecting).

This is very useful if you get segmentation violations or aborts for a program - this can sometimes be caused by linking against the wrong version of a library. This is also a really good way to understand what happens when you run any program! It has some self-documentation - for the impatient, you can do

原文引述一下memcached的问题:

LD_DEBUG 是 glibc 中的 loader 为了方便自身调试而设置的一个环境变量。通过设置这个环境变量,可以方便的看到 loader 的加载过程。 以在 64位 centos 上编译安装 memcached 为例,安装阶段顺利,执行 memcached 命令时出现错误:

#memcached –h
/usr/local/memcached/bin/memcached: error while loading shared libraries: libevent-1.4.so.2:
cannot open shared object file: No such file or directory
#find / -name libevent-1.4.so.2
/usr/lib/libevent-1.4.so.2


设置 LD_DEBUG 变量获得更多信息:
Tags: ,
很多时候我们在一个机器上使用的某个命令,到另外一个机器上没有,那想安装在另外一个机器,需要知道它是属于哪个rpm的,比如redhat下有一个setup的命令,可以图形化的管理很多系统设置:

[root@localhost www.aslibra.com]# setup
-bash: setup: command not found
[root@localhost www.aslibra.com]# yum -y install setup
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
addons                                                                                                       |  951 B     00:00    
base                                                                                                         | 2.1 kB     00:00    
extras                                                                                                       | 2.1 kB     00:00    
updates                                                                                                      | 1.9 kB     00:00    
Setting up Install Process
Package setup-2.5.58-7.el5.noarch already installed and latest version
Nothing to do

我们在另外一个可以的机器做个查询 rpm -qf 某个命令:
Tags: , ,
分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]

阅读推荐

服务器相关推荐

开发相关推荐

应用软件推荐