【发布时间】:2020-12-25 14:19:54
【问题描述】:
我正在尝试在新创建的 Amazon EC2 实例上安装 php-dom 扩展,但没有成功,但无论我尝试什么...
我尝试了以下命令(以及其他一些命令):
sudo yum install php-dom
sudo yum install php-xml
这是我每次得到的:
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
据我了解,php-xml(包括 php-dom)需要包 php-common 版本 5.4.16(?!),但我正在运行 PHP 版本 7.3,这可能是导致冲突?
我对 AWS 还很陌生,甚至更多关于终端命令,所以这里的任何帮助都非常感谢!如果您需要有关服务器的更多信息,我很乐意提供给您,我只是不知道那时有什么用处......
谢谢。
【问题讨论】:
-
你检查过哪些模块已经安装了吗?
标签: php amazon-web-services apache amazon-ec2 yum