【问题标题】:Dependency Issue Installing php-mbstring on RHEL (6)RHEL上安装php-mbstring的依赖问题(六)
【发布时间】:2015-03-03 23:18:11
【问题描述】:

我正在尝试在 Red Hat Enterprise Linux Server 6.6 版(圣地亚哥)上安装 php-mbstring。这是我的 yum 命令/响应:

-bash-4.1$ yum install php-mbstring --enablerepo=optional
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-mbstring.x86_64 0:5.3.3-27.el6_5 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-27.el6_5 for package: php-mbstring-5.3.3-27.el6_5.x86_64
--> Finished Dependency Resolution
Error: Package: php-mbstring-5.3.3-27.el6_5.x86_64 (optional)
           Requires: php-common(x86-64) = 5.3.3-27.el6_5
           Installed: php-common-5.3.3-40.el6_6.x86_64 (@updates)
               php-common(x86-64) = 5.3.3-40.el6_6
           Available: php-common-5.3.3-3.el6_2.8.x86_64 (updates)
               php-common(x86-64) = 5.3.3-3.el6_2.8
           Available: php-common-5.3.3-14.el6_3.x86_64 (updates)
               php-common(x86-64) = 5.3.3-14.el6_3
           Available: php-common-5.3.3-22.el6.x86_64 (updates)
               php-common(x86-64) = 5.3.3-22.el6
           Available: php-common-5.3.3-23.el6_4.x86_64 (updates)
               php-common(x86-64) = 5.3.3-23.el6_4
           Available: php-common-5.3.3-26.el6.x86_64 (base)
               php-common(x86-64) = 5.3.3-26.el6
           Available: php-common-5.3.3-27.el6_5.x86_64 (updates)
               php-common(x86-64) = 5.3.3-27.el6_5
           Available: php-common-5.3.3-27.el6_5.1.x86_64 (updates)
               php-common(x86-64) = 5.3.3-27.el6_5.1
           Available: php-common-5.3.3-27.el6_5.2.x86_64 (updates)
               php-common(x86-64) = 5.3.3-27.el6_5.2
           Available: php-common-5.3.3-38.el6.x86_64 (updates)
               php-common(x86-64) = 5.3.3-38.el6
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

但是,安装了 php-common:

-bash-4.1$ sudo yum list install php-common*
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Installed Packages
php-common.x86_64   5.3.3-40.el6_6  @updates

问题似乎是版本错误。但是版本比需要的新,所以它不应该工作吗?

我确实尝试了--skip-broken 和rpm -Va --nofiles --nodigest,但没有运气。

【问题讨论】:

  • 您有一个 CentOS 6.6 php-common 软件包,但似乎没有可用的 6.6 存储库。你应该解决这个问题。更新存储库应该有可用的 php-mbstring 包的 -40 版本,看起来像。确保您的元数据是最新的,看看不使用 --enablerepo=optional 是否会改变任何东西(如果元数据是正确的,我不认为它不应该)。
  • 如果不包含--enablerepo=optional,则找不到该包。
  • 我找到了更懂 Unix 的人来帮忙。我们必须删除 5.3.3-40.el6_6 版本的 php 包,然后安装 5.3.3-27.el6_5 版本,包括 php-mbstring。
  • 这肯定会起作用,但如果你从一个 repo 正确地获得了 -40 版本,但 ,这应该不是必需的。如果您没有使用 CentOS 6.6 或其他版本,那么“降级”是正确的解决方案。
  • 如标题所述,我们使用的是 RHEL 6。不确定它与 CentOS 的 repos 有何不同。

标签: php installation yum rhel6


【解决方案1】:

php-mbstring 包不是基本频道 repo 的一部分。您需要添加可选频道才能访问它的任何更新。

首先,您需要知道您是如何接收更新的:通过经典/卫星或订阅管理器。这将改变频道的添加方式。

如果使用 Classic,请尝试:rhn-channel --add --channel=rhel-x86_64-server-optional-6 系统将提示您输入 RHN 凭据。

过去,当我使用经典模式进行更新时,这对我有用。我已经更新为使用订阅管理器,并且频道以不同的方式添加。

要使用订阅管理器添加频道,请执行以下操作: 订阅管理器存储库--启用 rhel-6-server-optional-source-rpms (链接:https://access.redhat.com/solutions/392003)

无论出于何种原因,该命令本身并不能解决我的依赖问题。我还必须告诉 yum 启用该频道。我用这个命令做到了: yum-config-manager --enable rhel-6-server-optional-rpms (链接:https://access.redhat.com/solutions/221963)

完成这些步骤后,我的更新工作并解决了依赖关系。

【讨论】:

    【解决方案2】:

    如果有用,当您没有 RHN 凭据时,您可以执行以下操作: 首先,在网上的某个地方找到这个包(它必须是你的确切php版本),即:php-mbstring-5.3.3-40.el6_6.x86_64.rpm

    wget http://mirror.centos.org/centos/6/updates/x86_64/Packages/php-mbstring-5.3.3-40.el6_6.x86_64.rpm
    sudo yum localinstall php-mbstring-5.3.3-40.el6_6.x86_64.rpm 
    

    希望对你有帮助!

    【讨论】:

      猜你喜欢
      • 2015-09-20
      • 1970-01-01
      • 2014-10-18
      • 1970-01-01
      • 1970-01-01
      • 2016-07-26
      • 2021-06-30
      • 1970-01-01
      • 2023-03-31
      相关资源
      最近更新 更多