I recently attempted to install VMWare’s Perl API on Debian Lenny and received the following error:
/usr/bin/ld: cannot find -lssl
A quick dpkg -l revealed I had openssl installed. It turns out I needed to also install libssl-dev in order to meet all of the dependencies:
aptitude install libssl-dev
I also needed make:
aptitude install make
Next I tried executing the enumerate.pl example and received the following error message:
SSLLoadSharedLibrary: Failed to load library /usr/bin/libcrypto.so.0.9.7:/usr/bin/libcrypto.so.0.9.7: cannot open shared object file: No such file or directory
Uhh… a library in /usr/bin? Something is fishy here. I searched VMWare’s forums and found quite a few “workarounds” including one that appears to come from VMWare staff:
http://kb.vmware.com/selfservice/viewContent.do?externalId=1007612&sliceId=1
Clearly there is a better way. I glanced at my /etc/ld.so.conf and /etc/ld.so.conf.d and discovered the installation script did not add it’s custom library directory to the systems linker search path. Doh! So instead of copying or symbolically linking the library to /usr/bin which would be messy an illogical, I decided to add the VMWare library directory to system’s library search path by doing the following:
echo ‘/usr/lib/vmware-api/lib’ > /etc/ld.so.conf.d/vmware.conf
/sbin/ldconfig