LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 07-20-2007, 09:39 AM   #1
2007fld
Member
 
Registered: Mar 2007
Distribution: FD4,6
Posts: 52

Rep: Reputation: 15
perl module installation question


I just installed MIME::Base64 under my directory /home/helen

It built smoothly and installed smoothly. (i.e. perl Makefile.PL, make, make test, make install are all fine. of course, I became su to install it.)

To make sure I installed it successfully, I tried two methods.

1. perldoc MIME::Base64
I got error message "No documentation found for "MIME::Base64"."

2. I run a small script to call the module.
#!/usr/bin/perl

use lib '/home/helen/';
use MIME::Base64 qw(encode_base64);

open(FILE, "/home/helen/short.txt") or die "$!";
while (read(FILE, $buf, 60*57)) {
print encode_base64($buf);
}

I still got an error message
"Can't locate MIME/Base64.pm in @INC (@INC contains: /home/helen/ /usr/perl5/5.6.1/lib/sun4-solaris-64int /usr/perl5/5.6.1/lib /usr/perl5/site_perl/5.6.1/sun4-solaris-64int /usr/perl5/site_perl/5.6.1 /usr/perl5/site_perl /usr/perl5/vendor_perl/5.6.1/sun4-solaris-64int /usr/perl5/vendor_perl/5.6.1 /usr/perl5/vendor_perl .) at test_base64.pl line 4.
BEGIN failed--compilation aborted at test_base64.pl line 4.
"

So, did I install it correctly? ( I didn't get any error message.)
Why these two methods are not working? (these two methods were working if I try another module, say Module::CoreList.)
How do I know I installed it right or not?

Thanks so much!
 
Old 07-20-2007, 09:47 AM   #2
rizhun
Member
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu, SLES, AIX
Posts: 268

Rep: Reputation: 47
Try re-installing using the CPAN module:

sudo su -
perl -MCPAN -eshell
install MIME::Base64
 
Old 07-20-2007, 10:54 AM   #3
2007fld
Member
 
Registered: Mar 2007
Distribution: FD4,6
Posts: 52

Original Poster
Rep: Reputation: 15
THanks!, but got another error using cpan

Thanks much for replying my question. But when I tried the cpan, I got an error message:

"cc -c -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xO3 -xdepend -DVERSION=\"3 .07\" -DXS_VERSION=\"3.07\" -KPIC -I/usr/perl5/5.6.1/lib/sun4-solaris-64int/COR E Base64.c
sh: cc: not found"

I don't why know it calls 'cc' instead of 'gcc'.
I remember when I installed the module manually, I can see the Makefile used '$CC=gcc';

Now, since the module installation failed, can I see the Makefile somewhere?

Thanks!

P.S.
my system can find gcc
#which gcc
/usr/local/bin/gcc
 
Old 07-20-2007, 11:11 AM   #4
makyo
Member
 
Registered: Aug 2006
Location: Saint Paul, MN, USA
Distribution: {Free,Open}BSD, CentOS, Debian, Fedora, Solaris, SuSE
Posts: 718

Rep: Reputation: 72
Hi.

Addressing your meta-problem.

If you have:
Code:
cpan - easily interact with CPAN from the command line
installed, then you can use the easy steps, say with DBI:
Code:
% cpan
cpan[1]>
at that prompt, you can do:
Code:
get DBI
make DBI
test DBI
install DBI
If you need to look at the Makefile, you can do:
Code:
look DBI
and it will spawn a shell, placing you in the directory of interest. Details in man cpan or the cpan help sub-command.

I needed to do this recently to look at the readme file for DBD::mysql - to change a few testing parameters. I had to do the make manually while in that "look" directory with the usual "perl Makefile.PL ...", and so on, but it worked well.

For other modules, all I needed was the get - install steps while in the cpan-prompt shell.

Best wishes ... cheers, makyo

Last edited by makyo; 07-20-2007 at 11:15 AM.
 
Old 07-20-2007, 12:20 PM   #5
2007fld
Member
 
Registered: Mar 2007
Distribution: FD4,6
Posts: 52

Original Poster
Rep: Reputation: 15
hi Makyo, look MIME::Base64 leads me to

/.cpan/build/MIME-Base64-3.07-WvAOLu/
But I dind't see Makefile there, only Makefile.PL and other files and directories like README, t etc.

 
Old 07-20-2007, 12:50 PM   #6
makyo
Member
 
Registered: Aug 2006
Location: Saint Paul, MN, USA
Distribution: {Free,Open}BSD, CentOS, Debian, Fedora, Solaris, SuSE
Posts: 718

Rep: Reputation: 72
Hi.

Once you are in the look directory, enter:
Code:
perl Makefile.PL
it will make the Makefile, then you can look it over ... cheers, makyo
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl Module question stash1071 Programming 1 12-28-2006 11:44 AM
perl module installation init-5 Linux - Software 26 10-25-2004 04:14 AM
perl module installation black_man Slackware 2 10-17-2004 01:57 PM
Problems with installing GD perl module. Related to libgd installation. Chiabert Linux - Newbie 0 10-03-2003 01:19 PM
Perl/Tk module installation problem baddwolf Linux - Software 0 09-25-2003 11:11 PM


All times are GMT -5. The time now is 09:41 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration