在 Amazon Linux AMI 服务器上安装“yum install -y php70 mysql56-server php70-mysqlnd”时,我收到以下冲突:
Error: httpd24-tools conflicts with httpd-tools-2.2.34-1.16.amzn1.x86_64
Error: httpd24 conflicts with httpd-2.2.34-1.16.amzn1.x86_64
我不确定如何解决。冲突似乎与 httpd 安装和我尝试安装的内容有关。
看起来 Amazon Linux AMI 默认安装了 httpd
yum list installed | grep httpd
httpd.x86_64 2.2.34-1.16.amzn1 @amzn-main
httpd-tools.x86_64 2.2.34-1.16.amzn1 @amzn-main
尝试安装的完整输出如下:
sudo yum install -y php70 mysql56-server php70-mysqlnd
Loaded plugins: priorities, update-motd, upgrade-helper
Resolving Dependencies
--> Running transaction check
---> Package mysql56-server.x86_64 0:5.6.41-1.30.amzn1 will be installed
--> Processing Dependency: mysql56-errmsg(x86-64) = 5.6.41-1.30.amzn1 for package: mysql56-server-5.6.41-1.30.amzn1.x86_64
--> Processing Dependency: mysql56-common(x86-64) = 5.6.41-1.30.amzn1 for package: mysql56-server-5.6.41-1.30.amzn1.x86_64
--> Processing Dependency: perl-DBD-MySQL(mysql56) for package: mysql56-server-5.6.41-1.30.amzn1.x86_64
--> Processing Dependency: perl(Data::Dumper) for package: mysql56-server-5.6.41-1.30.amzn1.x86_64
--> Processing Dependency: perl(DBI) for package: mysql56-server-5.6.41-1.30.amzn1.x86_64
--> Processing Dependency: perl(DBI) for package: mysql56-server-5.6.41-1.30.amzn1.x86_64
--> Processing Dependency: mysql56(x86-64) for package: mysql56-server-5.6.41-1.30.amzn1.x86_64
--> Processing Dependency: mysql56(alternatives) for package: mysql56-server-5.6.41-1.30.amzn1.x86_64
--> Processing Dependency: mysql56(alternatives) for package: mysql56-server-5.6.41-1.30.amzn1.x86_64
--> Processing Dependency: mysql-config for package: mysql56-server-5.6.41-1.30.amzn1.x86_64
---> Package php70.x86_64 0:7.0.32-1.31.amzn1 will be installed
--> Processing Dependency: php70-cli(x86-64) = 7.0.32-1.31.amzn1 for package: php70-7.0.32-1.31.amzn1.x86_64
--> Processing Dependency: php70-common(x86-64) = 7.0.32-1.31.amzn1 for package: php70-7.0.32-1.31.amzn1.x86_64
--> Processing Dependency: httpd-mmn = 20120211x86-64 for package: php70-7.0.32-1.31.amzn1.x86_64
--> Processing Dependency: php70-common for package: php70-7.0.32-1.31.amzn1.x86_64
--> Processing Dependency: httpd24 for package: php70-7.0.32-1.31.amzn1.x86_64
---> Package php70-mysqlnd.x86_64 0:7.0.32-1.31.amzn1 will be installed
--> Processing Dependency: php70-pdo(x86-64) = 7.0.32-1.31.amzn1 for package: php70-mysqlnd-7.0.32-1.31.amzn1.x86_64
--> Running transaction check
---> Package httpd24.x86_64 0:2.4.34-1.82.amzn1 will be installed
--> Processing Dependency: httpd24-tools = 2.4.34-1.82.amzn1 for package: httpd24-2.4.34-1.82.amzn1.x86_64
---> Package mysql-config.x86_64 0:5.5.61-1.22.amzn1 will be installed
---> Package mysql56.x86_64 0:5.6.41-1.30.amzn1 will be installed
---> Package mysql56-common.x86_64 0:5.6.41-1.30.amzn1 will be installed
---> Package mysql56-errmsg.x86_64 0:5.6.41-1.30.amzn1 will be installed
---> Package perl-DBD-MySQL56.x86_64 0:4.023-5.21.amzn1 will be installed
--> Processing Dependency: libmysqlclient.so.1018(libmysqlclient_18)(64bit) for package: perl-DBD-MySQL56-4.023-5.21.amzn1.x86_64
--> Processing Dependency: libmysqlclient.so.1018()(64bit) for package: perl-DBD-MySQL56-4.023-5.21.amzn1.x86_64
---> Package perl-DBI.x86_64 0:1.627-4.8.amzn1 will be installed
--> Processing Dependency: perl(RPC::PlServer) >= 0.2001 for package: perl-DBI-1.627-4.8.amzn1.x86_64
--> Processing Dependency: perl(RPC::PlClient) >= 0.2000 for package: perl-DBI-1.627-4.8.amzn1.x86_64
---> Package perl-Data-Dumper.x86_64 0:2.145-3.5.amzn1 will be installed
---> Package php70-cli.x86_64 0:7.0.32-1.31.amzn1 will be installed
---> Package php70-common.x86_64 0:7.0.32-1.31.amzn1 will be installed
--> Processing Dependency: php70-process(x86-64) = 7.0.32-1.31.amzn1 for package: php70-common-7.0.32-1.31.amzn1.x86_64
--> Processing Dependency: php70-xml(x86-64) = 7.0.32-1.31.amzn1 for package: php70-common-7.0.32-1.31.amzn1.x86_64
--> Processing Dependency: php70-json(x86-64) for package: php70-common-7.0.32-1.31.amzn1.x86_64
---> Package php70-pdo.x86_64 0:7.0.32-1.31.amzn1 will be installed
--> Running transaction check
---> Package httpd24-tools.x86_64 0:2.4.34-1.82.amzn1 will be installed
---> Package mysql56-libs.x86_64 0:5.6.41-1.30.amzn1 will be installed
---> Package perl-PlRPC.noarch 0:0.2020-14.7.amzn1 will be installed
--> Processing Dependency: perl(Net::Daemon) >= 0.13 for package: perl-PlRPC-0.2020-14.7.amzn1.noarch
--> Processing Dependency: perl(Net::Daemon::Test) for package: perl-PlRPC-0.2020-14.7.amzn1.noarch
--> Processing Dependency: perl(Net::Daemon::Log) for package: perl-PlRPC-0.2020-14.7.amzn1.noarch
--> Processing Dependency: perl(Compress::Zlib) for package: perl-PlRPC-0.2020-14.7.amzn1.noarch
---> Package php70-json.x86_64 0:7.0.32-1.31.amzn1 will be installed
---> Package php70-process.x86_64 0:7.0.32-1.31.amzn1 will be installed
---> Package php70-xml.x86_64 0:7.0.32-1.31.amzn1 will be installed
--> Running transaction check
---> Package perl-IO-Compress.noarch 0:2.061-2.12.amzn1 will be installed
--> Processing Dependency: perl(Compress::Raw::Zlib) >= 2.061 for package: perl-IO-Compress-2.061-2.12.amzn1.noarch
--> Processing Dependency: perl(Compress::Raw::Bzip2) >= 2.061 for package: perl-IO-Compress-2.061-2.12.amzn1.noarch
---> Package perl-Net-Daemon.noarch 0:0.48-5.5.amzn1 will be installed
--> Running transaction check
---> Package perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.11.amzn1 will be installed
---> Package perl-Compress-Raw-Zlib.x86_64 1:2.061-4.1.amzn1 will be installed
--> Processing Conflict: httpd24-tools-2.4.34-1.82.amzn1.x86_64 conflicts httpd-tools < 2.4.34
--> Processing Conflict: httpd24-2.4.34-1.82.amzn1.x86_64 conflicts httpd < 2.4.34
--> Finished Dependency Resolution
Error: httpd24-tools conflicts with httpd-tools-2.2.34-1.16.amzn1.x86_64
Error: httpd24 conflicts with httpd-2.2.34-1.16.amzn1.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
答案1
尝试使用:
百胜安装 mod24_ssl.x86_64
带有 AMI Linux
答案2
首先要弄清楚为什么要安装 httpd 和 httpd-tools。如果不需要安装它们,您可以将其删除,然后用 httpd24 版本替换它们(最好是,2.2 已经很旧了)。要了解系统上需要 httpd 和 httpd-tools 的内容(如果有的话),请运行:
rpm -q --whatrequires httpd
rpm -q --whatrequires httpd-tools
答案3
我在 centos6 上遇到了几乎相同的问题,使用 @amzn-updates repo,httpd 2.4,而不是 2.2。为了解决这个问题,我删除了 httpd-tools 。
yum remove httpd24-tools
看起来它也删除了 httpd。没什么大不了的。
然后我安装了 php,这就是我遇到冲突的地方
yum install php72-..
然后我又安装了 php,然后又安装了 httpd。
yum install httpd24
这为我解决了这个问题。