On Tue, Jun 26, 2012 at 02:45:36PM +0800, Wanlong Gao wrote:
 Hi Rich,
 
 I meet below thing,
 
 [root@gaowanlong libguestfs]# virt-sysprep --help
 virt-sysprep: error while loading shared libraries: libguestfs.so.0: cannot open shared
object file: No such file or directory
 [root@gaowanlong libguestfs]# ln -s /usr/local/lib/libguestfs.so.0
/usr/lib64/libguestfs.so.0
 [root@gaowanlong libguestfs]# virt-sysprep --help
 virt-sysprep: reset or unconfigure a virtual machine so clones can be made
 
  virt-sysprep [--options] -d domname
 
  virt-sysprep [--options] -a disk.img [-a disk.img ...]
 
 A short summary of the options is given below.  For detailed help please
 read the man page virt-sysprep(1).
 
   -a file               Add disk image file
   --add file            Add disk image file
   -c uri                Set libvirt URI
   --connect uri         Set libvirt URI
   -d domain             Set libvirt guest name
   --debug-gc            Debug GC and memory allocations (internal)
 .....
 
 We installed the lib to the wrong path? 
rpath maybe?  You can try debugging this using the following commands:
  printenv | grep LD_
  which virt-sysprep
  ldd `which virt-sysprep`
  eu-readelf -d `which virt-sysprep`
  chrpath `which virt-sysprep`
Rich.
-- 
Richard Jones, Virtualization Group, Red Hat 
http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top