前へ|次へ|戻る

MINE::Base64 perl module install

今回の cgi には

use CGI qw(:standard);
use MIME::Base64;
use Jcode;

の 場所が 有ります これに 対して MIME::Base64 を 追加インストール す る 必要が 有るように 思われます
http://search.cpan.org/dist/MIME-Base64/
MIME-Base64-3.05.tar.gz
何ぞを 入手しましょう

$ scp MIME-Base64-3.05.tar.gz nyanta.no-ip.info:/home/nyanco
Enter passphrase for key '/home/nyanco/.ssh/id_rsa': 
MIME-Base64-3.05.tar.gz                       100%   15KB   7.7MB/s   00:00  

送ったら 相手の サーバーに 入ります

$ ssh -l nyanco nyanta.no-ip.info
Enter passphrase for key '/home/nyanco/.ssh/id_rsa': 
$ su -
Password: 
# cd /usr/local/src/
# mkdir misc
# cd misc/
# mv /home/nyanco/MIME-Base64-3.05.tar.gz .
# tar zxvf MIME-Base64-3.05.tar.gz 
MIME-Base64-3.05/
MIME-Base64-3.05/t/
MIME-Base64-3.05/t/warn.t
MIME-Base64-3.05/t/bad-sv.t
MIME-Base64-3.05/t/unicode.t
MIME-Base64-3.05/t/quoted-print.t
MIME-Base64-3.05/t/base64.t
MIME-Base64-3.05/README
MIME-Base64-3.05/QuotedPrint.pm
MIME-Base64-3.05/MANIFEST
MIME-Base64-3.05/decode-qp
MIME-Base64-3.05/encode-base64
MIME-Base64-3.05/encode-qp
MIME-Base64-3.05/Base64.pm
MIME-Base64-3.05/Changes
MIME-Base64-3.05/Makefile.PL
MIME-Base64-3.05/decode-base64
MIME-Base64-3.05/Base64.xs
# cd MIME-Base64-3.05

README の 内容の 抜粋

In order to install and use this package you will need Perl version
5.005 or better.  Installation as usual:

perl Makefile.PL
   make
   make test
   make install

ほなら

# perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for MIME::Base64
#  make
cp QuotedPrint.pm blib/lib/MIME/QuotedPrint.pm
cp Base64.pm blib/lib/MIME/Base64.pm
/usr/bin/perl /usr/lib/perl5/5.8.4/ExtUtils/xsubpp  -typemap \
/usr/lib/perl5/5.84/ExtUtils/typemap  Base64.xs > Base64.xsc && mv \
Base64.xsc Base64.c
cc -c   -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE \
-D_FILE_OFSET_BITS=64 -O2   -DVERSION=\"3.05\" -DXS_VERSION=\"3.05\" \
-fpic "-I/usr/lib/prl5/5.8.4/i686-linux/CORE"   Base64.c
Running Mkbootstrap for MIME::Base64 ()
chmod 644 Base64.bs
rm -f blib/arch/auto/MIME/Base64/Base64.so
LD_RUN_PATH="" cc  -shared -L/usr/local/lib Base64.o \
 -o blib/arch/auto/MIME/Bae64/Base64.so      
chmod 755 blib/arch/auto/MIME/Base64/Base64.so
cp Base64.bs blib/arch/auto/MIME/Base64/Base64.bs
chmod 644 blib/arch/auto/MIME/Base64/Base64.bs
cp decode-qp blib/script/decode-qp
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/decode-qp
cp encode-qp blib/script/encode-qp
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/encode-qp
cp decode-base64 blib/script/decode-base64
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/decode-base64
cp encode-base64 blib/script/encode-base64
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/encode-base64
Manifying blib/man3/MIME::QuotedPrint.3
Manifying blib/man3/MIME::Base64.3
# make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"\
 "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/bad-sv..........skipped
        all skipped: Perl::API needed for this test
t/base64..........ok                                                         
t/quoted-print....ok                                                         
t/unicode.........ok                                                         
t/warn............ok                                                         
All tests successful, 1 test skipped.
Files=5, Tests=339,  1 wallclock secs ( 0.54 cusr +  0.08 csys =  0.62 CPU)
# make install
Installing /usr/lib/perl5/5.8.4/i686-linux/auto/MIME/Base64/Base64.so
Files found in blib/arch: installing files in blib/lib into
architecture\
 dependent library tree
Installing /usr/lib/perl5/5.8.4/i686-linux/MIME/QuotedPrint.pm
Installing /usr/lib/perl5/5.8.4/i686-linux/MIME/Base64.pm
Installing /usr/share/man/man3/MIME::QuotedPrint.3
Installing /usr/share/man/man3/MIME::Base64.3
Installing /usr/bin/decode-qp
Installing /usr/bin/encode-qp
Installing /usr/bin/decode-base64
Installing /usr/bin/encode-base64
Writing /usr/lib/perl5/5.8.4/i686-linux/auto/MIME/Base64/.packlist
Appending installation info to /usr/lib/perl5/5.8.4/i686-linux/perllocal.pod
# cd
# exit
logout

では

$ perl -MMINE::Base64 -e 'print "MIME::Base64 is installed!\n"'
Can't locate MINE/Base64.pm in @INC (@INC contains:\
 /usr/lib/perl5/5.8.4/i686-linux /usr/lib/perl5/5.8.4 \
/usr/lib/perl5/site_perl/5.8.4/i686-linux /usr/lib/perl5/site_perl/5.8.4
 \
/usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl .).
BEGIN failed--compilation aborted.
$ su -
Password: 
# perl -MMINE::Base64 -e 'print "MIME::Base64 is installed!\n"'
Can't locate MINE/Base64.pm in @INC (@INC contains: \
/usr/lib/perl5/5.8.4/i686-linux /usr/lib/perl5/5.8.4 \
/usr/lib/perl5/site_perl/5.8.4/i686-linux /usr/lib/perl5/site_perl/5.8.4
 \
/usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl .).
BEGIN failed--compilation aborted.

なんでやねん?

# mv /usr/local/src/misc/MIME-Base64-3.05.tar.gz .
# pwd
/home/nyanco/.cpan/build
# tar zxvf MIME-Base64-3.05.tar.gz 
# cd MIME-Base64-3.05
# perl Makefile.PL
# make
# make test
# make install
# exit
logout
$ perl -MMINE::Base64 -e 'print "MIME::Base64 is installed!\n"'
Can't locate MINE/Base64.pm in @INC \
(@INC contains: /usr/lib/perl5/5.8.4/i686-linux /usr/lib/perl5/5.8.4\
 /usr/lib/perl5/site_perl/5.8.4/i686-linux \
/usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.6.1 \
/usr/lib/perl5/site_perl .).
BEGIN failed--compilation aborted.

どうして?

$ su -
Password: 
# cd /home/nyanco/.cpan/
# pwd
/home/nyanco/.cpan
# chown -R nyanco build/
# chgrp -R users build/
# shutdown -r now

再度 入る

$ ssh -l mm nyanta.no-ip.info
Enter passphrase for key '/home/mm/.ssh/id_rsa': 
$ perl -MMINE::Base64 -e 'print "MIME::Base64 is installed!\n"'
Can't locate MINE/Base64.pm in @INC \
(@INC contains: /usr/lib/perl5/5.8.4/i686-linux /usr/lib/perl5/5.8.4 \
/usr/lib/perl5/site_perl/5.8.4/i686-linux /usr/lib/perl5/site_perl/5.8.4\
 /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl .).
BEGIN failed--compilation aborted.
$ su -
Password: 
nyanta:~# find / -name *Base64*
/home/mm/.cpan/build/MIME-Base64-3.05.tar.gz
/home/mm/.cpan/build/MIME-Base64-3.05
/home/mm/.cpan/build/MIME-Base64-3.05/Base64.pm
/home/mm/.cpan/build/MIME-Base64-3.05/Base64.xs
/home/mm/.cpan/build/MIME-Base64-3.05/blib/lib/MIME/Base64.pm
/home/mm/.cpan/build/MIME-Base64-3.05/blib/lib/auto/MIME/Base64
/home/mm/.cpan/build/MIME-Base64-3.05/blib/arch/auto/MIME/Base64
/home/mm/.cpan/build/MIME-Base64-3.05/blib/arch/auto/MIME/Base64/Base64.so
/home/mm/.cpan/build/MIME-Base64-3.05/blib/arch/auto/MIME/Base64/Base64.bs
/home/mm/.cpan/build/MIME-Base64-3.05/blib/man3/MIME::Base64.3
/home/mm/.cpan/build/MIME-Base64-3.05/Base64.o
/home/mm/.cpan/build/MIME-Base64-3.05/Base64.c
/home/mm/.cpan/build/MIME-Base64-3.05/Base64.bs
/usr/lib/perl5/5.8.4/i686-linux/auto/MIME/Base64
/usr/lib/perl5/5.8.4/i686-linux/auto/MIME/Base64/Base64.so
/usr/lib/perl5/5.8.4/i686-linux/auto/MIME/Base64/Base64.bs
/usr/lib/perl5/5.8.4/i686-linux/MIME/Base64.pm
/usr/local/src/misc/MIME-Base64-3.05
/usr/local/src/misc/MIME-Base64-3.05/Base64.pm
/usr/local/src/misc/MIME-Base64-3.05/Base64.xs
/usr/local/src/misc/MIME-Base64-3.05/blib/lib/MIME/Base64.pm
/usr/local/src/misc/MIME-Base64-3.05/blib/lib/auto/MIME/Base64
/usr/local/src/misc/MIME-Base64-3.05/blib/arch/auto/MIME/Base64
/usr/local/src/misc/MIME-Base64-3.05/blib/arch/auto/MIME/Base64/Base64.so
/usr/local/src/misc/MIME-Base64-3.05/blib/arch/auto/MIME/Base64/Base64.bs
/usr/local/src/misc/MIME-Base64-3.05/blib/man3/MIME::Base64.3
/usr/local/src/misc/MIME-Base64-3.05/Base64.o
/usr/local/src/misc/MIME-Base64-3.05/Base64.c
/usr/local/src/misc/MIME-Base64-3.05/Base64.bs
/usr/share/man/man3/MIME::Base64.3.gz
/usr/share/man/man3/MIME::Base64.3
nyanta:~# exit

改善は

# cd /usr/lib/perl5/5.8.4/i686-linux
# cp /usr/local/src/misc/MIME-Base64-3.05/Base64.pm .
# perl -MMINE::Base64 -e 'print "MIME::Base64 is installed!\n"'
Can't locate MINE/Base64.pm in @INC \
(@INC contains: /usr/lib/perl5/5.8.4/i686-linux /usr/lib/perl5/5.8.4 \
/usr/lib/perl5/site_perl/5.8.4/i686-linux /usr/lib/perl5/site_perl/5.8.4\
 /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl .).
# rm Base64.pm

されない なぜ?

$ perl -MCPAN -e 'CPAN::Shell->install("MIME::Base64")'
CPAN: Storable loaded ok
Going to read /home/nyanco/.cpan/Metadata
  Database was generated on Tue, 09 Aug 2005 21:57:56 GMT
MIME::Base64 is up to date.
$ perl -MMINE::Base64 -e 'print "MIME::Base64 is installed!\n"'
Can't locate MINE/Base64.pm in @INC (@INC contains: \
/usr/lib/perl5/5.8.4/i686-linux /usr/lib/perl5/5.8.4\
 /usr/lib/perl5/site_perl/5.8.4/i686-linux \
/usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.6.1 \
/usr/lib/perl5/site_perl .).
BEGIN failed--compilation aborted.

うーーーん 良くわからない エラーがでないので インストールの 必要も 無いのか?

にゃんたろう 拝!
2005年 8月11日 (木) 23:01:44 JST 作成


前へ|次へ|戻る
Copyright © 2004.-2007. nyantarou All Rights Reserved.