Perl DateTime :: Locale :: en error

时间:2013-10-11 11:58:29

标签: linux perl datetime yum rhel

我正在尝试执行在我的RHEL5.8工作机器上使用DateTime::Format::Strptime的perl脚本。执行后,我收到错误:

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.

我相信这意味着DateTime::Format::Strptime可能需要比你安装的更新版本的DateTime :: Locale。我试图使用yum安装

sudo yum -y install perl-DateTime-Locale

然而,这与我的供应商DateTime :: Locale发生冲突,我收到了冗长且重复的错误事务

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 

我该如何解决这个问题?

修改


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

1 个答案:

答案 0 :(得分:1)

这很奇怪。 DateTime version 0.41不包含任何抱怨的语言环境文件。

我想知道这是否是红帽认为他们比CPAN作者更了解并做出脑死亡包装决定的那些场合之一。如果您可以先更新DateTime(“sudo yum update perl-DateTime”),可能值得一看。

如果这不起作用,请告诉我们您正在使用哪些yum存储库。

更新:进一步调查,我看到EPEL(提供DateTime副本的repo)有a nasty DateTime bundle,其中包括DateTime,DateTime :: Locale和DateTime :: TimeZone 。这意味着您无法轻松更新其中一个。我讨厌这样做。

不确定这里最好的方法是什么。我想我会构建自己的三个模块的RPM并安装它们而不是EPEL模块。但是直接从CPAN安装你想要的东西可能更容易。