Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't locate loadable object for module 1

Status
Not open for further replies.

netman4u

Technical User
Mar 16, 2005
176
US
Hello all,

I am using the Crypt::CBC module to encrypt and decrypt some text files. I am using Blowfish encryption with CBC. When I run my program it can't seem to find the Crypt::Blowfish module.

Here is the error:

Code:
Couldn't load Crypt::Blowfish: Can't locate loadable object for module Crypt::Blowfish in @INC (@INC contains: /opt/app/CLI_DAE/lib/Crypt-Blowfish-2.10/blib/lib /opt/app/CLI_DAE/lib/Crypt-Blowfish-2.10 /opt/app/CLI_DAE/lib/Net-SSH-0.08/blib/lib /opt/app/CLI_DAE/lib/Crypt-CBC-2.19/blib/lib /opt/app/CLI_DAE/lib/DBD-Oracle-1.18 /opt/app/CLI_DAE/lib/DBI-1.52 /usr/local/lib/perl5/5.8.7/sun4-solaris /usr/local/lib/perl5/5.8.7 /usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris /usr/local/lib/perl5/site_perl/5.8.7 /usr/local/lib/perl5/site_perl .) at (eval 6) line 1
Compilation failed in require at (eval 6) line 1.
 at ./bpBsCoyoteMain_Beta_10_18.pl line 324

I know for a fact Blowfish.pm is located in:

/opt/app/CLI_DAE/lib/Crypt-Blowfish-2.10/blib/lib/Crypt/


Here is the code for my libraries:

Code:
use lib "/opt/app/CLI_DAE/lib/DBI-1.52";
use lib "/opt/app/CLI_DAE/lib/DBD-Oracle-1.18";
use lib "/opt/app/CLI_DAE/lib/Crypt-CBC-2.19/blib/lib";
use lib "/opt/app/CLI_DAE/lib/Net-SSH-0.08/blib/lib";
use lib "/opt/app/CLI_DAE/lib/Crypt-Blowfish-2.10/blib/lib";
use lib "/opt/app/CLI_DAE/lib/Crypt-Blowfish-2.10";
use DBI;
use Crypt::CBC;
use FileHandle;
use Net::SSH qw(sshopen2);
use strict;
#use warnings;

Here is the subroutine that contains line 324 where Crypt::CBC calls the Crypt::Blowfish module:

Code:
sub Decrypt 
{
	##########################################################################################
	#
	#  This subroutine decrypts the password/UID files.
	#
	##########################################################################################
	#use lib "/opt/app/CLI_DAE/lib/Crypt-Blowfish-2.10/blib/lib";
	my $file_handle = shift(@_);
	open(CT,"<$file_handle") or ErrorOut ("Error opening config file $file_handle: $1");;
	my $cipher = new Crypt::CBC({'key'         => 't1234',
								 'cipher'      => 'Blowfish',
								 'padding'     => 'space'});
	undef $/;
	my $passwd = $cipher->decrypt(<CT>);
	close(CT);
	print LOG "encrypted file $file_handle decrypted successfully.\n";
	return $passwd;
} # End sub Decrypt

I checked permissions to Blowfish.pm and they all look fine.

Any ideas?

Thanks,

Nick


If at first you don't succeed, don't try skydiving.
 
You've very annoyingly already attempted all of the obvious fixes. Checking your include, making sure that file permissions are correct.

The only thing that I would suggest is that you add an explicit "use Crypt::Blowfish;" line just before "use Crypt::CBC". This will cause the failure to at least happen at compile time instead of runtime for your script. (assuming you're using mod_perl). Other than that, all I can suggest is that you keep on fiddling, because something isn't right with either the module, your include, or permissions.

If you discover the problem, let us know.
 
Thanks MillerH. I was able to solve the problem but I cannot remember how!

If at first you don't succeed, don't try skydiving.
 
I ended up using these "use lib" statements which fixed it.

Code:
use lib "/opt/app/CLI_DAE/lib/perl5/site_perl";
use lib "/opt/app/CLI_DAE/lib/";
use lib "/opt/app/CLI_DAE/lib/sun4-solaris";

If at first you don't succeed, don't try skydiving.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top