Reputation: 237
I'm trying unsuccessfully to install php-dom extension on a newly created Amazon EC2 instance, but I fail to do so whatever I try...
I tried the following commands (among some others):
sudo yum install php-dom
sudo yum install php-xml
Here's what I get every time:
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core | 3.7 kB 00:00
202 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package php-xml.x86_64 0:5.4.16-46.amzn2.0.2 will be installed
--> Processing Dependency: php-common(x86-64) = 5.4.16-46.amzn2.0.2 for package: php-xml-5.4.16-46.amzn2.0.2.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.24)(64bit) for package: php-xml-5.4.16-46.amzn2.0.2.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.22)(64bit) for package: php-xml-5.4.16-46.amzn2.0.2.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.18)(64bit) for package: php-xml-5.4.16-46.amzn2.0.2.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.13)(64bit) for package: php-xml-5.4.16-46.amzn2.0.2.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.11)(64bit) for package: php-xml-5.4.16-46.amzn2.0.2.x86_64
--> Processing Dependency: libxslt.so.1()(64bit) for package: php-xml-5.4.16-46.amzn2.0.2.x86_64
--> Processing Dependency: libexslt.so.0()(64bit) for package: php-xml-5.4.16-46.amzn2.0.2.x86_64
--> Running transaction check
---> Package libxslt.x86_64 0:1.1.28-5.amzn2.0.2 will be installed
---> Package php-xml.x86_64 0:5.4.16-46.amzn2.0.2 will be installed
--> Processing Dependency: php-common(x86-64) = 5.4.16-46.amzn2.0.2 for package: php-xml-5.4.16-46.amzn2.0.2.x86_64
--> Finished Dependency Resolution
Error: Package: php-xml-5.4.16-46.amzn2.0.2.x86_64 (amzn2-core)
Requires: php-common(x86-64) = 5.4.16-46.amzn2.0.2
Installed: php-common-7.3.19-1.amzn2.x86_64 (@amzn2extra-php7.3)
php-common(x86-64) = 7.3.19-1.amzn2
Available: php-common-5.4.16-43.amzn2.x86_64 (amzn2-core)
php-common(x86-64) = 5.4.16-43.amzn2
Available: php-common-5.4.16-43.amzn2.0.1.x86_64 (amzn2-core)
php-common(x86-64) = 5.4.16-43.amzn2.0.1
Available: php-common-5.4.16-43.amzn2.0.2.x86_64 (amzn2-core)
php-common(x86-64) = 5.4.16-43.amzn2.0.2
Available: php-common-5.4.16-43.amzn2.0.3.x86_64 (amzn2-core)
php-common(x86-64) = 5.4.16-43.amzn2.0.3
Available: php-common-5.4.16-43.amzn2.0.4.x86_64 (amzn2-core)
php-common(x86-64) = 5.4.16-43.amzn2.0.4
Available: php-common-5.4.16-45.amzn2.0.5.x86_64 (amzn2-core)
php-common(x86-64) = 5.4.16-45.amzn2.0.5
Available: php-common-5.4.16-45.amzn2.0.6.x86_64 (amzn2-core)
php-common(x86-64) = 5.4.16-45.amzn2.0.6
Available: php-common-5.4.16-46.amzn2.0.2.x86_64 (amzn2-core)
php-common(x86-64) = 5.4.16-46.amzn2.0.2
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
As far as I understand, php-xml (which includes php-dom) needs the package php-common version 5.4.16 (?!), but I'm running PHP version 7.3, which may be the cause of the conflict?
I'm fairly new to AWS, and even more regarding terminal commands, so any help here is appreciated! If you need more info about the server I will gladly provide it to you, I just don't know what could be useful at that point...
Thank you.
Upvotes: 3
Views: 3741
Reputation: 238051
If you installed php 7.3 using
sudo amazon-linux-extras install php7.3
then there shouldn't be any issues installing php-xml
for 7.3 using sudo yum install php-xml
:
=======================================================================================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================================================================================
Installing:
php-xml x86_64 7.3.19-1.amzn2 amzn2extra-php7.3
Upvotes: 2