[英]Dependency Issue Installing php-mbstring on RHEL (6)
I am trying to install php-mbstring on Red Hat Enterprise Linux Server release 6.6 (Santiago). 我正在尝试在Red Hat Enterprise Linux Server 6.6(圣地亚哥)上安装php-mbstring。 This is my yum command/response:
这是我的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
However, php-common is installed: 但是,已安装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
The issue appears to be that the version is wrong. 问题似乎是版本错误。 But the version is newer than what is needed, so shouldn't it work?
但是该版本比需要的版本新,所以它行不通吗?
I did try both --skip-broken
and rpm -Va --nofiles --nodigest
and no luck. 我确实尝试过
--skip-broken
和rpm -Va --nofiles --nodigest
并且没有运气。
The php-mbstring package is not part of the Base channel repo. php-mbstring软件包不属于基本频道回购。 You will need to add the Optional channel to access any updates for it.
您将需要添加可选通道以访问其任何更新。
First, you will need to know how you are receiving your updates: via Classic/Satellite or Subscription Manager. 首先,您将需要知道您如何接收更新:通过Classic / Satellite或Subscription Manager。 This will change the way the channel is added.
这将更改添加频道的方式。
If using Classic, try: rhn-channel --add --channel=rhel-x86_64-server-optional-6 You will be prompted for your RHN credentials. 如果使用Classic,请尝试:rhn-channel --add --channel = rhel-x86_64-server-optional-6。将提示您输入RHN凭据。
That worked for me in the past when I was using the Classic mode for updates. 过去,当我使用“经典”模式进行更新时,这对我有用。 I have since updated to using Subscription Manager and the channels are added in a different way.
此后,我已更新为使用Subscription Manager,并且以不同的方式添加了频道。
To add the channel using Subscription Manager, do this: subscription-manager repos --enable rhel-6-server-optional-source-rpms (link: https://access.redhat.com/solutions/392003 ) 要使用Subscription Manager添加频道,请执行以下操作:subscription-manager repos --enable rhel-6-server-optional-source-rpms(链接: https : //access.redhat.com/solutions/392003 )
For whatever reason, that command alone did not fix my dependency issue. 无论出于何种原因,仅凭该命令都无法解决我的依赖性问题。 I also had to tell yum to enable that channel.
我还必须告诉yum启用该频道。 I did so with this command: yum-config-manager --enable rhel-6-server-optional-rpms (link: https://access.redhat.com/solutions/221963 )
我使用以下命令进行了此操作:yum-config-manager --enable rhel-6-server-optional-rpms(链接: https : //access.redhat.com/solutions/221963 )
Once I completed those steps my updates worked and resolved the dependencies. 完成这些步骤后,我的更新就可以工作并解决了依赖性。
If useful, when you don't have the RHN credentials, you can do the following: First, find the package somewhere online (it must be for your exact php version), ie: php-mbstring-5.3.3-40.el6_6.x86_64.rpm
如果有用,当您没有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
I hope it helps! 希望对您有所帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.