[Libguestfs] shared library path

Wanlong Gao gaowanlong at cn.fujitsu.com
Tue Jun 26 08:19:03 UTC 2012


On 06/26/2012 03:48 PM, Richard W.M. Jones wrote:
> On Tue, Jun 26, 2012 at 02:45:36PM +0800, Wanlong Gao wrote:
>> Hi Rich,
>>
>> I meet below thing,
>>
>> [root at 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 at gaowanlong libguestfs]# ln -s /usr/local/lib/libguestfs.so.0 /usr/lib64/libguestfs.so.0
>> [root at 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`

I just did "make install", and the libguestfs.so.0 installed under "/usr/local/lib/",
but virt-sysprep needs a lib path "/lib64/libguestfs.so.0", and it can't find out
the lib under "/usr/local/lib" ? Is it a virt-sysprep bug or install path bug?

Thanks,
Wanlong Gao

> 
> Rich.
> 





More information about the Libguestfs mailing list