shared library path
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? Thanks, Wanlong Gao
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
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@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`
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.
On Tue, Jun 26, 2012 at 04:19:03PM +0800, Wanlong Gao wrote:
On 06/26/2012 03:48 PM, Richard W.M. Jones wrote:
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?
I've no idea. What about the commands above? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
BTW I never use 'make install' (except in RPM spec files). Instead I use the ./run script in the top level directory. See the README file. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v
On 06/26/2012 04:26 PM, Richard W.M. Jones wrote:
BTW I never use 'make install' (except in RPM spec files).
OK, but I wonder if RPM spec can hit the same wrong thing ?
Instead I use the ./run script in the top level directory. See the README file.
Yes, I know this. See below, [root@gaowanlong libguestfs]# ldd `which virt-filesystems ` linux-vdso.so.1 => (0x00007fff86abe000) /usr/lib64/libXft-infinality/libXft.so.2 (0x0000003a62000000) /usr/lib64/freetype-infinality/libfreetype.so.6 (0x0000003a5fe00000) ======> libguestfs.so.0 => /usr/local/lib/libguestfs.so.0 (0x00007f06b8839000) libc.so.6 => /lib64/libc.so.6 (0x000000319ac00000) libfontconfig.so.1 => /lib64/libfontconfig.so.1 (0x0000003a60200000) libXrender.so.1 => /lib64/libXrender.so.1 (0x00000036aba00000) libX11.so.6 => /lib64/libX11.so.6 (0x00000036ab200000) libm.so.6 => /lib64/libm.so.6 (0x000000319bc00000) libpcre.so.0 => /lib64/libpcre.so.0 (0x00000036af200000) libxml2.so.2 => /lib64/libxml2.so.2 (0x00000031a2000000) librt.so.1 => /lib64/librt.so.1 (0x000000319b800000) /lib64/ld-linux-x86-64.so.2 (0x000000319a400000) libexpat.so.1 => /lib64/libexpat.so.1 (0x000000319fc00000) libxcb.so.1 => /lib64/libxcb.so.1 (0x00000036aae00000) libdl.so.2 => /lib64/libdl.so.2 (0x000000319b400000) libz.so.1 => /lib64/libz.so.1 (0x000000319c000000) libpthread.so.0 => /lib64/libpthread.so.0 (0x000000319b000000) libXau.so.6 => /lib64/libXau.so.6 (0x000000319e800000) [root@gaowanlong libguestfs]# ldd `which virt-sysprep` linux-vdso.so.1 => (0x00007fffd13ff000) /usr/lib64/libXft-infinality/libXft.so.2 (0x0000003a62000000) /usr/lib64/freetype-infinality/libfreetype.so.6 (0x0000003a5fe00000) ====> libguestfs.so.0 => not found libncurses.so.5 => /lib64/libncurses.so.5 (0x00000031b1000000) libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00000031ad800000) libm.so.6 => /lib64/libm.so.6 (0x000000319bc00000) libdl.so.2 => /lib64/libdl.so.2 (0x000000319b400000) libc.so.6 => /lib64/libc.so.6 (0x000000319ac00000) libfontconfig.so.1 => /lib64/libfontconfig.so.1 (0x0000003a60200000) libXrender.so.1 => /lib64/libXrender.so.1 (0x00000036aba00000) libX11.so.6 => /lib64/libX11.so.6 (0x00000036ab200000) /lib64/ld-linux-x86-64.so.2 (0x000000319a400000) libexpat.so.1 => /lib64/libexpat.so.1 (0x000000319fc00000) libxcb.so.1 => /lib64/libxcb.so.1 (0x00000036aae00000) libXau.so.6 => /lib64/libXau.so.6 (0x000000319e800000) Our virt-filesystems can find out libguestfs.so.0, but virt-sysprep not. So, I think there must be some thing wrong here. Thanks, Wanlong Gao
Rich.
On Tue, Jun 26, 2012 at 04:50:09PM +0800, Wanlong Gao wrote:
Our virt-filesystems can find out libguestfs.so.0, but virt-sysprep not. So, I think there must be some thing wrong here.
It's probably a stray rpath. virt-sysprep is written in OCaml and gets its library paths from one of the files ocaml/mlguestfs.* Anyway, try the commands I suggested previously. 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
On Tue, Jun 26, 2012 at 04:50:09PM +0800, Wanlong Gao wrote:
[root@gaowanlong libguestfs]# ldd `which virt-filesystems ` ======> libguestfs.so.0 => /usr/local/lib/libguestfs.so.0 (0x00007f06b8839000) [root@gaowanlong libguestfs]# ldd `which virt-sysprep` ====> libguestfs.so.0 => not found
Although note in this case virt-filesystems is *wrong* (because it contains a hard-coded rpath), and virt-sysprep is correct. Anyway, try the commands I suggested before. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
participants (2)
-
Richard W.M. Jones -
Wanlong Gao