2016-02-09 77 views
2

我只是在RHEL上安裝php 5.4.16,但我也希望安裝mbstring。當我嘗試安裝它通過yum ...我得到libgmp.so.3依賴錯誤無法安裝mbstring php ...缺少libgmp.so.3

[[email protected] ec2-user]# yum install php-mbstring 
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos 
Resolving Dependencies 
--> Running transaction check 
---> Package php70w-mbstring.x86_64 0:7.0.2-1.w6 will be installed 
--> Processing Dependency: php70w-common(x86-64) = 7.0.2-1.w6 for package: php70w-mbstring-7.0.2-1.w6.x86_64 
--> Running transaction check 
---> Package php70w-common.x86_64 0:7.0.2-1.w6 will be installed 
--> Processing Dependency: libgmp.so.3()(64bit) for package: php70w-common-7.0.2-1.w6.x86_64 
--> Processing Conflict: php70w-common-7.0.2-1.w6.x86_64 conflicts php-common < 5.5.0 
--> Finished Dependency Resolution 
Error: Package: php70w-common-7.0.2-1.w6.x86_64 (webtatic) 
      Requires: libgmp.so.3()(64bit) 
Error: php70w-common conflicts with php-common-5.4.16-36.el7_1.x86_64 
You could try using --skip-broken to work around the problem 
You could try running: rpm -Va --nofiles --nodigest 

編輯:

嘗試安裝5.4 MBSTRING但我仍然得到相關的同樣的錯誤libgmp.so.3

[[email protected] ec2-user]# yum install php54w-mbstring-5.4.45-2.w6.x86_64 
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos 
Resolving Dependencies 
--> Running transaction check 
---> Package php54w-mbstring.x86_64 0:5.4.45-2.w6 will be installed 
--> Processing Dependency: php54w-common(x86-64) = 5.4.45-2.w6 for package: php54w-mbstring-5.4.45-2.w6.x86_64 
--> Running transaction check 
---> Package php54w-common.x86_64 0:5.4.45-2.w6 will be installed 
--> Processing Dependency: libgmp.so.3()(64bit) for package: php54w-common-5.4.45-2.w6.x86_64 
--> Finished Dependency Resolution 
Error: Package: php54w-common-5.4.45-2.w6.x86_64 (webtatic) 
      Requires: libgmp.so.3()(64bit) 
You could try using --skip-broken to work around the problem 
You could try running: rpm -Va --nofiles --nodigest 

我的/ usr/lib64的目錄...我有一個libgmp.so.10 ....但沒有看到一個0.3

+0

您的回購設置不正確,並且正試圖將v7庫裝入v5。 4.16安裝。 –

回答

0

您正在嘗試爲php7安裝mbstring,但是您當前安裝的php版本是5.4。您可以刪除php-common-5.4.16-36.el7_1.x86_64,而改爲安裝php70w-common-7.0.2-1.w6.x86_64,或者如果您不想升級到7,則可以找到php5.4的mbstring。

+0

試圖安裝5.4版本的mbstring,但得到相同的錯誤... – user2061886