Hi Danjo Creations!

On Monday 17 August 2009 22:48:28 Danjo Creations wrote:
> My script is working fine one our dev server, but I've run into a problem
> with client server with missing modules. No root access, so I did upload 2
> other missing modules into a 'lib' in the account, and they're fine.
>
> No such luck with Blowfish.
>
>       my $cipher=Crypt::CBC->new( {   cipher => 'Blowfish',
>                                       prepend_iv => 0,
>                                       key    => $key,
>                                       iv => $iv               } );
>       if ($mode eq 'e') { return encode_base64($cipher->encrypt($input));
> }
>       elsif ($mode eq 'd') { return
> $cipher->decrypt(decode_base64($input)); }
>
> MIME::Base64 is working on its own in a test script.
>
> I uploaded Crypt::CBC /Crypt/CBC.pm and all the other files that came with
> including the 't' folder with Blowfish.t and Blowfish_PP.t
>
> The "Can't find module" error went away, but was replaced with:
> "Couldn't load Crypt::Blowfish: Can't locate loadable object for module
> Crypt::Blowfish in @INC
> Compilation failed in require at (eval 15) line 1"
>
> I uploaded Crypt::Blowfish - in the same /Crypt/ folder as CBC
>
> The error persists
>

That's because you probably haven't compiled the Crypt::Blowfish binary 
extensions (".so", ".dll" or whatever). Crypt::Blowfish has some parts written 
in C that are compiled into machine code, and used as a Perl extension and you 
need to upload them to the server. Just uploading it isn't enough.

Do you have a C compiler (such as http://gcc.gnu.org/ ) on the server? If so, 
you can do the "perl Makefile.PL ; make ; make test ; make install" routine". 
For more information see:

http://perl-begin.org/topics/cpan/

Regards,

        Shlomi Fish

> Do I also need /Net/SSH/Perl/Cipher/Blowfish.pm which I see on the dev
> server or am I missing something else? Or am I dealing with module(s) that
> can only be installed higher up the food chain?
>
> Everything I found via Google mentioning "Can't locate loadable object for
> module" alluded to a missing or incorrect installation. There was also a
> mention of permissions. All are the account's owner:group with 755 on the
> folders and 644 on the files, same as the 2 modules that are working.
>
> Jo

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
http://www.shlomifish.org/humour/ways_to_do_it.html

God gave us two eyes and ten fingers so we will type five times as much as we
read.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to