5

All the Perl dependencies for it are met but I'm getting this error:

Can't locate object method "ssl_opts" via package "LWP::UserAgent" at SES.pm line 250.

2 Answers 2

4

I just wanted to document what I had to do to get this running on my Debian system. The solution for Ubuntu is probably the same.

First, to let Perl find SES.pm make the directory /usr/local/lib/site_perl and copy SES.pm there. I prefer this solution over what the README recommends.

Your system probably has a lot of the dependencies met already so instead of installing duplicate packages just check first which ones it needs. To do that run these commands. If it gives an error it's not met:

perl -e 'use Crypt::SSLeay'
perl -e 'use Digest::SHA'
perl -e 'use Bundle::LWP'
perl -e 'use LWP::Protocol::https'
perl -e 'use MIME::Base64'
perl -e 'use Crypt::SSLeay'
perl -e 'use XML::LibXML'

I had to remove the package libcrypt-ssleay-perl because it's not compatible with this Amazon script. With it the script produces the error in the question.

I installed these packages from Debian:

libxml-libxml-perl
libssl-dev (needed to compile dependencies)

To find out which package contains the Perl module you need use this page on the Debian site to search the contents of packages: http://www.debian.org/distrib/packages

Replace the :: in the package with / and put .pm at the end. For example if you need XML::LibXML search for XML/LibXML.pm

I installed these packages from CPAN. It takes a little while though. There are a lot of dependencies.

perl -MCPAN -e 'install LWP::Protocol::https'
perl -MCPAN -e 'install Crypt::SSLeay'
1

Comment out line 250 in SES.pm, as follows:

# $browser->ssl_opts(verify_hostname => 1);

Then it will run. Probably less secure. But it runs.

1
  • All the modules are there the script is not running. Eventually I have to do this.
    – phunehehe
    Oct 12, 2011 at 11:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.