I am trying to install php-mbstring on Red Hat Enterprise Linux Server release 6.6 (Santiago). This is my yum command/response:
我正在嘗試在Red Hat Enterprise Linux Server版本6.6 (Santiago)上安裝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
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.
我試過兩種方法——跳脫壞和rpm -Va——nofiles——nodigest和no luck。
2 个解决方案
#1
1
The php-mbstring package is not part of the Base channel repo. You will need to add the Optional channel to access any updates for it.
php-mbstring包不是基通道repo的一部分。您將需要添加可選通道來訪問它的任何更新。
First, you will need to know how you are receiving your updates: via Classic/Satellite or Subscription Manager. This will change the way the channel is added.
首先,您需要知道如何接收更新:通過Classic/Satellite或Subscription Manager。這將改變添加通道的方式。
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= rhl -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.
在過去,當我使用經典模式進行更新時,這對我很有效。我后來更新到使用訂閱管理器,並以不同的方式添加通道。
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)
要使用訂閱管理器添加通道,請執行以下操作:訂閱管理器repos—啟用rhello -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. I did so with this command: yum-config-manager --enable rhel-6-server-optional-rpms (link: https://access.redhat.com/solutions/221963)
不管出於什么原因,這個命令本身並不能解決依賴性問題。我還得告訴yum,要啟用這個頻道。我這樣做的命令是:yum-config-manager——啟用rhl -6-server-optional-rpms(鏈接:https://access.redhat.com/solutions/221963)
Once I completed those steps my updates worked and resolved the dependencies.
一旦我完成了這些步驟,我的更新工作並解決了依賴關系。
#2
0
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!
我希望它可以幫助!