Reputation: 4108
I am trying to execute a perl script which uses DateTime::Format::Strptime
on my RHEL5.8 work machine. Upon execution I receive the error:
Can't locate object method "am_pm_abbreviated" via package "DateTime::Locale::en" at /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Format/Strptime.pm line 777.
I believe this means DateTime::Format::Strptime
probably expects a newer version of DateTime::Locale than the one you have installed. I have tried to install using yum
sudo yum -y install perl-DateTime-Locale
This however conflicts with my vendor DateTime::Locale and I recieve the lengthy and repetitive error transaction
Transaction Check Error:
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/Base.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/aa.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/aa_ER_SAAHO.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/af.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/af_NA.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/ak.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/am.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/ar.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/ar_JO.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/ar_LB.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/ar_QA.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/ar_SA.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/ar_SY.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/ar_TN.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/ar_YE.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/as.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/az.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/az_Cyrl.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/be.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/bg.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/bn.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/bo.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/bs.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/byn.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/ca.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/cch.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/cop.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/cs.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/cy.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/da.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/de.pm from install of perl-DateTime-Locale-0.45-1.el5.rf.noarch conflicts with file from package perl-DateTime-0.41-1.el5.x86_64
file /usr/lib/perl5/vendor_perl/5.8.8/DateTime/Locale/de_AT.pm from install of
How do I get around this?
EDIT
Output of yum repolist
repo id repo name status
elrepo ELRepo.org Community Enterprise Linux Repository - el5 444
epel Extra Packages for Enterprise Linux 5 - x86_64 7,471
rpmforge RHEL 5Client - RPMforge.net - dag 11,312
rpmfusion-free-updates RPM Fusion for EL 5 - Free - Updates 165
repolist: 19,392
Upvotes: 0
Views: 1831
Reputation: 69314
That's strange. DateTime version 0.41 didn't contain any of the locale files that it's complaining about.
I wonder if this is one of those occasions when Red Hat think they know better than the CPAN authors and make brain-dead packaging decisions. It might be worth seeing if you can update DateTime first ("sudo yum update perl-DateTime").
If that doesn't work, then tell us which yum repositories you're using.
Update: Investigating further, I see that EPEL (which is the repo that supplies your copy of DateTime) has a nasty DateTime bundle which include DateTime, DateTime::Locale and DateTime::TimeZone. Which means you can't easily update one of them on its own. I hate it when they do that.
Not sure what the best approach is here. I think I'd build my own RPMs of those three modules and install them instead of the EPEL ones. But it might be easier to just install what you want directly from CPAN.
Upvotes: 1