Yum

sudo yum install httpd 拋出錯誤

  • August 6, 2014

您好,這是我輸入的命令並返回您看到的錯誤,請有任何建議

[ec2-user@ip-172-31-41-46 ~]$ sudo yum install httpd


Loaded plugins: priorities, update-motd, upgrade-helper
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.2.27-1.3.amzn1 will be installed
--> Processing Dependency: httpd-tools = 2.2.27-1.3.amzn1 for package: httpd-2.2.27-1.3.amzn1.x86_64
--> Running transaction check
---> Package httpd-tools.x86_64 0:2.2.27-1.3.amzn1 will be installed
--> Processing Conflict: httpd24-2.4.10-1.59.amzn1.x86_64 conflicts httpd < 2.4.10
--> Processing Conflict: httpd24-tools-2.4.10-1.59.amzn1.x86_64 conflicts httpd-tools < 2.4.10
--> Finished Dependency Resolution
Error: httpd24-tools conflicts with httpd-tools-2.2.27-1.3.amzn1.x86_64
Error: httpd24 conflicts with httpd-2.2.27-1.3.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-172-31-41-46 ~]$

當我執行 yum install –skip-broken httpd 它返回:

Packages skipped because of dependency problems:
   httpd-2.2.27-1.3.amzn1.x86_64 from amzn-updates
   httpd-tools-2.2.27-1.3.amzn1.x86_64 from amzn-updates

您正在嘗試安裝httpd包含 2.2 版 Apache 的軟體包,但您已經安裝了httpd24包含 2.4 版 Apache 的軟體包。

在做任何其他事情之前,首先確定你真正想要的版本。

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