installing php and apache on Amazon EC2 instances
14,808
Solution 1
Have you read the error message ? Read again:
Error: httpd24-tools conflicts with httpd-tools-2.2.25-1.0.amzn1.x86_64
Error: php54-common conflicts with php-common-5.3.27-1.0.amzn1.x86_64
You are trying to install HTTPD 2.4 when you appear to have HTTPD 2.2 installed and same thing with php, namely, you have PHP 5.3 installed and you are trying to install 5.4. A simple way to confirm this is to type in the following into bash:
php -v
httpd -V
If you want to install newer versions then remove the older versions.
yum remove httpd-tools-2.2.25-1.0.amzn1.x86_64 php-common-5.3.27-1.0.amzn1.x86_64
Solution 2
More specifically, httpd
== version 2.2. php54
is trying to install httpd24
.
Don't specify httpd
. Let your version of PHP determine which version of Apache to install.
Author by
modon
Updated on July 24, 2022Comments
-
modon over 1 year
I am trying to install PHP on amazon ec2 instances but when I run the following command: sudo yum -y install httpd php54-fpm php54-common
it gives me the following errors:
Loaded plugins: priorities, security, update-motd, upgrade-helper Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package httpd.x86_64 0:2.2.25-1.0.amzn1 will be installed --> Processing Dependency: httpd-tools = 2.2.25-1.0.amzn1 for package: httpd-2.2.25- 1.0.amzn1.x86_64 --> Processing Dependency: apr-util-ldap for package: httpd-2.2.25-1.0.amzn1.x86_64 ---> Package php54-common.x86_64 0:5.4.17-2.41.amzn1 will be installed ---> Package php54-fpm.x86_64 0:5.4.17-2.41.amzn1 will be installed --> Running transaction check enter code here ---> Package apr-util-ldap.x86_64 0:1.4.1-4.14.amzn1 will be installed ---> Package httpd-tools.x86_64 0:2.2.25-1.0.amzn1 will be installed --> Processing Conflict: httpd24-tools-2.4.6-2.47.amzn1.x86_64 conflicts httpd-tools < 2.4.6 --> Processing Conflict: php54-common-5.4.17-2.41.amzn1.x86_64 conflicts php-common < 5.4.17-2.41.amzn1 --> Finished Dependency Resolution Error: httpd24-tools conflicts with httpd-tools-2.2.25-1.0.amzn1.x86_64 Error: php54-common conflicts with php-common-5.3.27-1.0.amzn1.x86_64 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
Thanks in advance.
-
DOOManiac almost 10 yearsGreat tip on not specifying httpd
-
Josiah about 6 yearsThat's great except when your app has only been tested against the other version. Why is php specifying an apache version?
-
Ryan Parman about 6 yearsThat’s a great question. Seriously. Genuinely. Another great question is why are you still using Apache instead of Nginx? Yet another question is why aren’t you using Docker with Alpine Linux instead?