如何解决有关为Perl模块捆绑CentOS RPM的问题
我正在尝试将一堆Perl模块捆绑在RPM软件包中,以便于部署。我尝试了很多工具,但选择了fpm(https://github.com/jordansissel/fpm)。
因此,我设法为每个必需的Perl模块手动构建和安装每个RPM。我不确定这是正确的。但是我对RPM软件包没有太多的经验。但是据我所知,这是正确的行为。每个RPM软件包都包含相应Perl模块所需的所有依赖项。
问题是当我尝试使用生成的捆绑包安装模块时遇到一些冲突。
sudo yum --disablerepo=* localinstall *.rpm
当它尝试安装时:
Transaction Summary
==============================================================================================================================================================================================================
Install 174 Packages
Total size: 45 M
Installed size: 357 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Error: Transaction test error:
file /usr/local/lib64/perl5/auto/Moose/Moose.so conflicts between attempted installs of Moose-Exporter-2.2013-1.x86_64 and Moose-2.2013-1.x86_64
file /usr/local/lib64/perl5/auto/Moose/Moose.so conflicts between attempted installs of Moose-Role-2.2013-1.x86_64 and Moose-Exporter-2.2013-1.x86_64
file /usr/local/lib64/perl5/auto/Moose/Moose.so conflicts between attempted installs of Moose-Util-TypeConstraints-2.2013-1.x86_64 and Moose-Role-2.2013-1.x86_64
file /usr/local/lib64/perl5/auto/Moose/Moose.so conflicts between attempted installs of Moose-Util-2.2013-1.x86_64 and Moose-Util-TypeConstraints-2.2013-1.x86_64
file /usr/local/lib64/perl5/auto/Moose/Moose.so conflicts between attempted installs of Moose-Meta-TypeConstraint-2.2013-1.x86_64 and Moose-Util-2.2013-1.x86_64
file /usr/local/lib64/perl5/auto/Moose/Moose.so conflicts between attempted installs of Moose-Meta-TypeConstraint-Union-2.2013-1.x86_64 and Moose-Meta-TypeConstraint-2.2013-1.x86_64
file /usr/local/lib64/perl5/auto/Moose/Moose.so conflicts between attempted installs of Moose-Util-MetaRole-2.2013-1.x86_64 and Moose-Meta-TypeConstraint-Union-2.2013-1.x86_64
file /usr/local/lib64/perl5/auto/Moose/Moose.so conflicts between attempted installs of Moose-Meta-Attribute-2.2013-1.x86_64 and Moose-Util-MetaRole-2.2013-1.x86_64
file /usr/local/lib64/perl5/auto/Moose/Moose.so conflicts between attempted installs of Moose-Meta-Class-2.2013-1.x86_64 and Moose-Meta-Attribute-2.2013-1.x86_64
file /usr/local/lib64/perl5/auto/Moose/Moose.so conflicts between attempted installs of Moose-Meta-Role-2.2013-1.x86_64 and Moose-Meta-Class-2.2013-1.x86_64
file /usr/local/lib64/perl5/auto/Moose/Moose.so conflicts between attempted installs of Moose-Meta-Role-Attribute-2.2013-1.x86_64 and Moose-Meta-Role-2.2013-1.x86_64
file /usr/local/lib64/perl5/auto/HTML/Parser/Parser.so conflicts between attempted installs of HTML-HeadParser-3.75-1.x86_64 and HTML-Entities-3.75-1.x86_64
我花了几天时间尝试调试问题,但似乎无法弄清楚。我所做的就是使用yum安装perl,因为这是前提条件。我希望本地安装能够正常工作。
解决方法
错误消息似乎很清楚:您不能有两个提供相同文件的软件包。
对于Moose.so
周围的错误,您可能希望将共享库移到一个单独的程序包中,并使其成为需要它的所有模块的依赖项。
对于HTML-HeadParser
周围的错误,我想您只是拥有一个HTML-Parser
程序包,并使HTML-HeadParser
和HTML-Entitities
之类的东西依赖于此。
也许需要一些时间,看看现有的Perl模块是如何包装的?例如,查看:
- perl-HTML-Parser
- perl-HTML-Entities-Interpolate
- perl-Moose以及所有其他
perl-Moose-*
和perl-MooseX-*
软件包都位于同一存储库中。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。