jdporter has asked for the wisdom of the Perl Monks concerning the following question:

Trying to use Crypt::OpenSSL::AES (in conjunction with Crypt::CBC).
This is on Linux (CentOS, like RHEL).
Using ActiveState Perl, not the native CentOS perl.

I get the following error: (I've inserted linebreaks for readability)

Couldn't load Crypt::OpenSSL::AES: Can't load '/opt/ActivePerl-5.10/site/lib/auto/Crypt/OpenSSL/AES/AES.s +o' for module Crypt::OpenSSL::AES: libcrypto.so.0.9.7: cannot open shared object file: No such file or directory at /opt/ActivePerl-5.10/lib/XSLoader.pm line 70, <> line 1. at /opt/ActivePerl-5.10/site/lib/Crypt/OpenSSL/AES.pm line 37

Searching for libcrypto.so, I find the following:

/lib/libcrypto.so.6 /lib/libcrypto.so.0.9.8e

Is AES.so hard-coded to prefer version 0.9.7 of the lib? What's the best way to get past this problem? Downgrade the lib? Or take a chance on symlinking the 0.9.8e version as 0.9.7? Would that even work, even if there are no interface breakages between the versions of the lib?

Thanks,,,

Between the mind which plans and the hands which build, there must be a mediator... and this mediator must be the heart.

Replies are listed 'Best First'.
Re: Dependencies and compiled perl modules (Crypt::OpenSSL::AES)
by Illuminatus (Curate) on Sep 22, 2009 at 16:39 UTC
    Why do you have to downgrade the lib? Why can you not have 0.9.7 and 0.9.8 both installed? If there is a symlink from /lib/libcrypto.so (or .so.6) to 0.9.8, there is nothing to prevent you from having 0.9.7 there as well. It looks like AES.pm references the lib using the full name.

      You're right. I should have just TIAS. Symlinking as 0.9.7 worked. :-)