Troubleshooting Dynamic Libraries
Problem
On Windows, the SSL library is placed in the same directory as other vixDiskLib dynamically loaded libraries. On Linux, functions that load the libraries libssl.so.0.9.8 and libcrypto.so.0.9.8 do the following:
- Attempt to load them from the environment’s LD_LIBRARY_PATH location.
- Next, attempt to load them from the directory where libvixDiskLib.so is located.
- Next, attempt to load them from the directory where the executable is located.
- Failing that, exit with an error.
On install, VDDK creates the directory /usr/lib/vimware-vix-disklib, populated with 64-bit executables and libraries placed into subdirectories bin64 and lib64. On determining the OS type, VDDK copies the vixDiskLib and vixMntapi libraries into /usr/lib. It does not copy libssl.so.0.9.8 or libcrypto.so.0.9.8 into /usr/lib.
On execution, the root user normally has no LD_LIBRARY_PATH, and /usr/lib is ahead of /opt/vmware/lib in the path. Running the ldd command can help diagnose where a program is getting libvixDiskLib.so and other libraries. The /opt/vmware/lib directory is neither created nor updated by the VDDK install script.
If you see the error “Failed to load library libcrypto.so.0.9.8” there are several solutions:
Solution
- Set or reset the LD_LIBRARY_PATH environment so it contains one of the directories above, /lib64 and possibly /bin64, before it contains /usr/lib.
- Change the symbolic link in /opt/vmware/lib (or elsewhere) so it points to the directory above, /lib64.
- Copy the libssl and libcrypto libraries from /usr/lib/vmware-vix-disklib/lib64 into /usr/lib.