我正在尝试更新我的所有软件包,所以我运行了:
emerge -aUDU --with-bdeps=y --verbose-conflicts @world
我发现了一些包冲突。但有趣的是,它安排了dev-lang/perl
安装两个不同版本的软件包:
dev-lang/perl:0
(dev-lang/perl-5.22.1:0/5.22::gentoo, ebuild scheduled for merge) pulled in by
=dev-lang/perl-5.22* required by (virtual/perl-IO-1.350.0:0/0::gentoo, ebuild scheduled for merge)
^ ^^^^^
=dev-lang/perl-5.22* required by (virtual/perl-version-0.990.900-r2:0/0::gentoo, ebuild scheduled for merge)
^ ^^^^^
=dev-lang/perl-5.22* required by (virtual/perl-File-Spec-3.560.0:0/0::gentoo, ebuild scheduled for merge)
^ ^^^^^
=dev-lang/perl-5.22* required by (virtual/perl-CPAN-Meta-YAML-0.12.0-r1:0/0::gentoo, ebuild scheduled for merge)
^ ^^^^^
=dev-lang/perl-5.22* required by (virtual/perl-ExtUtils-MakeMaker-7.40.100_rc:0/0::gentoo, ebuild scheduled for merge)
^ ^^^^^
=dev-lang/perl-5.22* required by (virtual/perl-ExtUtils-ParseXS-3.280.0:0/0::gentoo, ebuild scheduled for merge)
^ ^^^^^
=dev-lang/perl-5.22* required by (virtual/perl-CPAN-Meta-2.150.1:0/0::gentoo, ebuild scheduled for merge)
^ ^^^^^
=dev-lang/perl-5.22* required by (virtual/perl-Module-Metadata-1.0.26:0/0::gentoo, ebuild scheduled for merge)
^ ^^^^^
=dev-lang/perl-5.22* required by (virtual/perl-Parse-CPAN-Meta-1.441.400-r1:0/0::gentoo, ebuild scheduled for merge)
^ ^^^^^
=dev-lang/perl-5.22* required by (virtual/perl-JSON-PP-2.273.0:0/0::gentoo, ebuild scheduled for merge)
^ ^^^^^
(dev-lang/perl-5.20.2:0/5.20::gentoo, ebuild scheduled for merge) pulled in by
=dev-lang/perl-5.20* required by (virtual/perl-Getopt-Long-2.420.0-r1:0/0::gentoo, ebuild scheduled for merge)
^ ^^^^^
=dev-lang/perl-5.20* required by (virtual/perl-ExtUtils-Install-1.670.0:0/0::gentoo, ebuild scheduled for merge)
^ ^^^^^
=dev-lang/perl-5.20.2* required by (virtual/perl-Storable-2.490.100-r1:0/0::gentoo, ebuild scheduled for merge)
^ ^^^^^^^
=dev-lang/perl-5.20.2* required by (virtual/perl-ExtUtils-CBuilder-0.280.217-r2:0/0::gentoo, ebuild scheduled for merge)
^ ^^^^^^^
=dev-lang/perl-5.20* required by (virtual/perl-Test-Harness-3.330.0:0/0::gentoo, ebuild scheduled for merge)
^ ^^^^^
=dev-lang/perl-5.20* required by (virtual/perl-Compress-Raw-Zlib-2.65.0:0/0::gentoo, ebuild scheduled for merge)
^ ^^^^^
=dev-lang/perl-5.20* required by (virtual/perl-ExtUtils-Manifest-1.630.0-r2:0/0::gentoo, ebuild scheduled for merge)
^ ^^^^^
=dev-lang/perl-5.20* required by (virtual/perl-Perl-OSType-1.7.0:0/0::gentoo, ebuild scheduled for merge)
我已经取消合并使用任一版本作为依赖项的每个软件包dev-lang/perl
(至少是那些已安装并列为导致冲突的软件包),并且我尝试通过/etc/portage/package.mask/perl
执行以下操作来屏蔽任一版本:
>dev-lang/perl-5.20.2
或者
<=dev-lang/perl-5.22.1
但冲突依然存在。
我是否必须屏蔽依赖于其中一个版本的每个包,或者是否有其他方法来处理此冲突?
答案1
使用
EIX_LIMIT=0 emerge -1auvDNt -j2 --verbose-conflicts =dev-lang/perl-5.22* $(eix '-I#' virtual/perl-*)
我能够在我的系统上将 Perl 从 5.20 更新到 5.22。
来源:https://forums.gentoo.org/viewtopic-p-7593286.html#7593286
答案2
这对我有用,其他都不起作用:
#!/bin/bash
# unmerge perl virtuals
emerge --unmerge $(qlist --installed virtual/perl)
# print perl blockers and quit
if emerge -pq dev-lang/perl:0 2>/dev/null | grep blocks
then
echo
echo "unmerge packages blocking perl upgrade"
exit 1
else
# upgrade perl
perl-cleaner --reallyall -- dev-lang/perl:0
fi
exit 0
从:https://forums.gentoo.org/viewtopic-p-7790388.html?sid=5198a9a0af09fca7f15b170de417a5da#7790388