Amazon-Ec2

亞馬遜 linux 包衝突

  • January 29, 2014

我正在嘗試在 amazon linux 上安裝 php55-fpm,但與 php-common 存在包衝突。如何解決這個問題?

[ec2-user@ip-10-0-12-54 ~]$ sudo yum install php55-fpm
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main/latest                                                                                                                                   | 2.1 kB     00:00     
amzn-updates/latest                                                                                                                                | 2.3 kB     00:00     
Resolving Dependencies
--> Running transaction check
---> Package php55-fpm.x86_64 0:5.5.7-1.61.amzn1 will be installed
--> Processing Dependency: php55-common(x86-64) = 5.5.7-1.61.amzn1 for package: php55-fpm-5.5.7-1.61.amzn1.x86_64
--> Running transaction check
---> Package php55-common.x86_64 0:5.5.7-1.61.amzn1 will be installed
--> Processing Dependency: php55-pecl-jsonc(x86-64) for package: php55-common-5.5.7-1.61.amzn1.x86_64
--> Processing Dependency: libzip.so.2()(64bit) for package: php55-common-5.5.7-1.61.amzn1.x86_64
--> Running transaction check
---> Package libzip.x86_64 0:0.10.1-1.3.amzn1 will be installed
---> Package php55-pecl-jsonc.x86_64 0:1.3.2-1.9.amzn1 will be installed
--> Processing Dependency: /usr/bin/pecl for package: php55-pecl-jsonc-1.3.2-1.9.amzn1.x86_64
--> Processing Dependency: libjson-c.so.2()(64bit) for package: php55-pecl-jsonc-1.3.2-1.9.amzn1.x86_64
--> Running transaction check
---> Package json-c.x86_64 0:0.11-4.5.amzn1 will be installed
---> Package php-pear.noarch 1:1.9.4-20.15.amzn1 will be installed
--> Processing Dependency: php-cli for package: 1:php-pear-1.9.4-20.15.amzn1.noarch
--> Processing Dependency: php-posix for package: 1:php-pear-1.9.4-20.15.amzn1.noarch
--> Processing Dependency: php-xml for package: 1:php-pear-1.9.4-20.15.amzn1.noarch
--> Running transaction check
---> Package php-cli.x86_64 0:5.3.28-1.2.amzn1 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.28-1.2.amzn1 for package: php-cli-5.3.28-1.2.amzn1.x86_64
---> Package php-process.x86_64 0:5.3.28-1.2.amzn1 will be installed
---> Package php-xml.x86_64 0:5.3.28-1.2.amzn1 will be installed
--> Running transaction check
---> Package php-common.x86_64 0:5.3.28-1.2.amzn1 will be installed
--> Processing Conflict: php55-common-5.5.7-1.61.amzn1.x86_64 conflicts php-common < 5.5.7-1.61.amzn1
--> Finished Dependency Resolution
Error: php55-common conflicts with php-common-5.3.28-1.2.amzn1.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
[ec2-user@ip-10-0-12-54 ~]$ cat /etc/issue
Amazon Linux AMI release 2013.09
Kernel \r on an \m

這是一個新的亞馬遜 linux 盒子。根本沒有php。

謝謝

OK,這裡我們看到依賴是在嘗試引入php-pear,這依賴於php-common,是錯誤的版本;我會期待php55-common,並且可能會將php55-pear包裹拉到這裡。

這不是您可以真正解決的問題;您嘗試從中安裝的儲存庫已損壞包。(不幸的是,這種低質量的包裝在 Amazon Linux 中太常見了,這是我建議不要使用它的原因之一。)您需要聯繫 Amazon,或者更好的是,使用 Amazon Linux 以外的任何東西。

引用自:https://serverfault.com/questions/570863