Wednesday, June 25, 2008

Installing MIME::Parser on CentOS 5

Had to install the Perl module on a mail server, and I wanted to use yum to install everything, so here it goes...

First, I made sure I don't have it already isntalled:

mail rpms# perl -e 'use MIME::Parser'
Can't locate MIME/Parser.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi \
/usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi \
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 \
/usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl \
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi \
/usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi \
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 \
/usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl \
/usr/lib/perl5/5.8.8/i386-linux-thread-multi \
/usr/lib/perl5/5.8.8 .) at -e line 1.
BEGIN failed--compilation aborted at -e line 1.


No luck using yum, and no luck Googling, so off to the DAG route we go!

wget http://dag.wieers.com/rpm/packages/perl-MIME-tools/perl-MIME-tools-5.420-2.el5.rf.noarch.rpm



No luck at all installing just the RPM package... No surprise here.

mail rpms# rpm --test -ivh perl-MIME-tools-5.420-2.el5.rf.noarch.rpm
warning: perl-MIME-tools-5.420-2.el5.rf.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
error: Failed dependencies:
perl(Convert::BinHex) is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::InnerFile) is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::Lines) is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::Lines) >= 1.108 is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::Scalar) is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::Scalar) >= 1.117 is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::ScalarArray) is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::ScalarArray) >= 1.114 is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::Stringy) >= 1.211 is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::Wrap) is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(Mail::Field) is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(Mail::Field) >= 1.05 is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(Mail::Header) >= 1.06 is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(Mail::Internet) >= 1.28 is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl-MailTools >= 1.15 is needed by perl-MIME-tools-5.420-2.el5.rf.noarch


So, the first things first... perl-MailTools:

mail rpms# yum install perl-MailTools
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for perl-MailTools to pack into transaction set.
perl-MailTools-1.77-1.el5 100% |=========================| 13 kB 00:00
---> Package perl-MailTools.noarch 0:1.77-1.el5.centos set to be updated
--> Running transaction check
--> Processing Dependency: perl(Date::Parse) for package: perl-MailTools
--> Processing Dependency: perl(Date::Format) for package: perl-MailTools
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for perl-TimeDate to pack into transaction set.
perl-TimeDate-1.16-5.el5. 100% |=========================| 7.7 kB 00:00
---> Package perl-TimeDate.noarch 1:1.16-5.el5 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
perl-MailTools noarch 1.77-1.el5.centos extras 91 k
Installing for dependencies:
perl-TimeDate noarch 1:1.16-5.el5 base 32 k

Transaction Summary
=============================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 123 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): perl-TimeDate-1.16 100% |=========================| 32 kB 00:00
(2/2): perl-MailTools-1.7 100% |=========================| 91 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: perl-TimeDate ######################### [1/2]
Installing: perl-MailTools ######################### [2/2]

Installed: perl-MailTools.noarch 0:1.77-1.el5.centos
Dependency Installed: perl-TimeDate.noarch 1:1.16-5.el5
Complete!


After that, another test at installing the MIME::Parser package... I'm pretty sure it will not work...

mail rpms# rpm --test -ivh perl-MIME-tools-5.420-2.el5.rf.noarch.rpm
warning: perl-MIME-tools-5.420-2.el5.rf.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
error: Failed dependencies:
perl(Convert::BinHex) is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::InnerFile) is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::Lines) is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::Lines) >= 1.108 is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::Scalar) is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::Scalar) >= 1.117 is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::ScalarArray) is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::ScalarArray) >= 1.114 is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::Stringy) >= 1.211 is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::Wrap) is needed by perl-MIME-tools-5.420-2.el5.rf.noarch


It doesn't so, off to yum to see what else is out there...

mail rpms# yum search perl-IO | less

Loading "installonlyn" plugin
Setting up repositories
Reading repository metadata in from local files

perl-IO-Socket-SSL.noarch 1.01-1.fc6 base
Matched from:
perl-IO-Socket-SSL

perl-IO-Zlib.noarch 1.04-4.2.1 base
Matched from:
perl-IO-Zlib

perl-IO-Socket-INET6.noarch 2.51-2.fc6 base
Matched from:
perl-IO-Socket-INET6

perl-IO-String.noarch 1.08-1.1.1 base
Matched from:
perl-IO-String

perl-IO-Socket-SSL.noarch 1.01-1.fc6 installed
Matched from:
perl-IO-Socket-SSL

perl-IO-Zlib.noarch 1.04-4.2.1 installed
Matched from:
perl-IO-Zlib

perl-IO-Socket-INET6.noarch 2.51-2.fc6 installed
Matched from:
perl-IO-Socket-INET6


So, I'll install those:

[root@mail rpms]# yum install perl-IO-String perl-IO-Zlib perl-IO-Socket-SSL
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for perl-IO-String to pack into transaction set.
perl-IO-String-1.08-1.1.1 100% |=========================| 3.5 kB 00:00
---> Package perl-IO-String.noarch 0:1.08-1.1.1 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
perl-IO-String noarch 1.08-1.1.1 base 13 k

Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 13 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): perl-IO-String-1.0 100% |=========================| 13 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: perl-IO-String ######################### [1/1]

Installed: perl-IO-String.noarch 0:1.08-1.1.1
Complete!


Only one was needed, the others were already installed... But, still, no luck at all...

mail rpms# rpm --test -ivh perl-MIME-tools-5.420-2.el5.rf.noarch.rpm
warning: perl-MIME-tools-5.420-2.el5.rf.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
error: Failed dependencies:
perl(Convert::BinHex) is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::InnerFile) is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::Lines) is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::Lines) >= 1.108 is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::Scalar) is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::Scalar) >= 1.117 is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::ScalarArray) is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::ScalarArray) >= 1.114 is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::Stringy) >= 1.211 is needed by perl-MIME-tools-5.420-2.el5.rf.noarch
perl(IO::Wrap) is needed by perl-MIME-tools-5.420-2.el5.rf.noarch


On the mean time, I'll get the BinHex thing going on, no problems here:

mail rpms# wget http://dag.wieers.com/rpm/packages/perl-Convert-BinHex/perl-Convert-BinHex-1.119-2.2.el5.rf.noarch.rpm
mail rpms# rpm --test -ivh perl-Convert-BinHex-1.119-2.2.el5.rf.noarch.rpm
warning: perl-Convert-BinHex-1.119-2.2.el5.rf.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
Preparing... ########################################### [100%]


And, to wrap up the whole thing, the package I needed was 'perl-IO-stringy'... What can I say, I'm a shmuck.

mail rpms# rpm --test -ivh perl-IO-stringy-2.110-1.2.el5.rf.noarch.rpm perl-MIME-tools-5.420-2.el5.rf.noarch.rpm
warning: perl-IO-stringy-2.110-1.2.el5.rf.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
Preparing... ########################################### [100%]


After that, test it, and you are done:

mail rpms# perl -e 'use MIME::Parser'
mail rpms#


I got the prompt back without any message, so it is installed.

Labels: , ,

1 Comments:

Blogger Inprofile said...

After reading your instructions I still got this error: Can't locate MIME/Parser.pm

Do you have a nother suggestion?

6:02 PM  

Post a Comment

<< Home