出现有关被阻止的软件包的抱怨:我该怎么办?

出现有关被阻止的软件包的抱怨:我该怎么办?

我们在工作中有一个运行 Gentoo 的旧开发服务器。我想更新这个系统,但我一直遇到打包系统的问题。对我来说,它似乎依赖于各种软件包的多个版本,我不知道如何修复它。

最大的问题可能与 Python 和 Portage 有关。我需要更新的 Portage,但似乎存在循环依赖关系。

我尝试过各种解决方案,但不太确定从这里开始。有什么线索可以帮助我进一步修复它吗?

更多信息

以下是运行后的输出(相关部分)emerge --update --newuse --deep @world

(lots of normal output ....)
[ebuild     U ] app-misc/mc-4.7.0.3 [4.6.1-r4] USE="edit%* -slang*" 
....
[blocks B     ] >=dev-lang/python-2.6.6 (">=dev-lang/python-2.6.6" is blocking sys-apps/portage-2.1.6.7)
[blocks B     ] <sys-apps/portage-2.1.7.16 ("<sys-apps/portage-2.1.7.16" is blocking app-shells/bash-4.1_p9)
[blocks B     ] <sys-apps/portage-2.1.9 ("<sys-apps/portage-2.1.9" is blocking dev-lang/python-2.7.1-r1)

 * Error: The above package list contains packages which cannot be
 * installed at the same time on the same system.

  (dev-lang/python-2.7.1-r1, ebuild scheduled for merge) pulled in by
    =dev-lang/python-2* required by (dev-vcs/mercurial-1.7, ebuild scheduled for merge)
    =dev-lang/python-2*[threads] required by (dev-vcs/mercurial-1.7, ebuild scheduled for merge)
    =dev-lang/python-2* required by (dev-libs/glib-2.28.6, ebuild scheduled for merge)
    (and 1 more)

  (app-shells/bash-4.1_p9, ebuild scheduled for merge) pulled in by
    >=app-shells/bash-3.2_p17 required by (sys-apps/portage-2.1.9.42, ebuild scheduled for merge)
    app-shells/bash required by (sys-block/di-4.18, ebuild scheduled for merge)
    app-shells/bash required by (app-admin/perl-cleaner-2.7, ebuild scheduled for merge)
    (and 2 more)

  (dev-lang/python-3.1.3-r1, ebuild scheduled for merge) pulled in by
    dev-lang/python required by (app-admin/python-updater-0.9, ebuild scheduled for merge)
    >=dev-lang/python-3 required by (sys-apps/portage-2.1.9.42, ebuild scheduled for merge)
    =dev-lang/python-3.1* required by (dev-java/java-config-2.1.11-r3, ebuild scheduled for merge)

这是运行 emerge --pretend --depclean 时输出的相关部分

Calculating dependencies... done!
 * Dependencies could not be completely resolved due to
 * the following required packages not being installed:
 * 
 *   >=dev-lang/python-2.4 pulled in by:
 *     sys-apps/portage-2.1.6.7
 * 
 *   dev-lang/python pulled in by:
 *     dev-java/java-config-2.1.7
 * 
 *   dev-lang/python pulled in by:
 *     dev-libs/libxml2-2.6.31
 * 
 *   <dev-lang/python-2.6.6 pulled in by:
 *     sys-apps/portage-2.1.6.7
 * 
 *   >=dev-lang/python-2.2 pulled in by:
 *     dev-libs/beecrypt-4.1.2-r1
 * 
 *   virtual/python pulled in by:
 *     dev-python/pycrypto-2.0.1-r6
 * 
 *   >=dev-lang/python-2.3 pulled in by:
 *     dev-vcs/mercurial-1.0.2
 * 
 *   >=dev-java/java-config-2.1.9-r1 pulled in by:
 *     dev-libs/beecrypt-4.1.2-r1
 * 
 *   virtual/python pulled in by:
 *     dev-lang/swig-1.3.34
 * 
 *   dev-lang/python pulled in by:
 *     net-fs/samba-3.0.28a-r1
 * 
 *   >=dev-lang/python-2.2 pulled in by:
 *     app-arch/rpm-4.4.6-r6
 * 
 *   >=virtual/python-2.2.1 pulled in by:
 *     sys-libs/libcap-1.10-r11
 * 
 *   dev-lang/python pulled in by:
 *     sys-libs/cracklib-2.8.9-r1
 * 

答案1

几天前我也遇到了同样的问题。我不知道该怎么做,但这里有一个通用的方法:

首先看一下/var/lib/portage/world。备份并将软件包精简为系统启动所需的软件包。以下是一些内容,可帮助您入门:

app-admin/syslog-ng
net-firewall/iptables
net-misc/dhcpcd
sys-apps/pciutils
sys-apps/slocate
sys-apps/usbutils
sys-boot/grub
sys-kernel/gentoo-sources
sys-power/acpid
sys-process/vixie-cron
virtual/inetd

其余所有内容将稍后更新。

最关键的部分是让 portage 和 python 更新到最新版本,所以让我们集中精力于此。

  1. 出现你的 portage 目录:

    emerge --sync
    

    或者:

    emerge-webrsync
    
  2. 设置有效的配置文件

    eselect profile list
    eselect profile set <x>
    
  3. 逐步升级python/portage。

    查看您当前安装的 portage 版本。将 portage 升级到比当前版本更高的版本(即使它被 ~x86 屏蔽),然后对 python 执行相同操作。升级 python 后,请确保运行python-updater

    一步一步地执行此操作,直到 python/portage 更新到最新版本。(您可以跳过一些小版本升级。您将亲眼看到哪些版本会导致编译错误,哪些版本会导致编译错误。)

  4. 一旦它们工作,就尝试安装一些其他软件包,因为它们可能会帮助您完成任务。

    app-portage/ufed
    app-portage/autounmask
    app-portage/gentoolkit
    
  5. 一旦 python/portage 更新完毕,您就可以恢复旧的世界文件并更新您的系统。

    emerge -pvauDN world
    

    您可能需要致电:

    emerge ...
    emerge --depclean
    revdep-rebuild
    

    在构建过程中多次。

答案2

如果问题出在 python 上,请尝试运行python-updater 注意,你可以通过命令选择当前版本的 pythoneselect

相关内容