为了账号安全,请及时绑定邮箱和手机立即绑定

无法安装 php 包

无法安装 php 包

PHP
森林海 2023-03-04 10:42:22
我从 GitHub 克隆了一个项目,并尝试使用我安装的 Composer 安装包,没有出现任何问题。我运行作曲家安装。不幸的是,我遇到了这些我无法弄清楚的错误,我该怎么办?    Loading composer repositories with package informationInstalling dependencies (including require-dev) from lock fileYour requirements could not be resolved to an installable set of packages.  Problem 1    - Installation request for tijsverkoyen/css-to-inline-styles 2.2.2 -> satisfiable by tijsverkoyen/css-to-inline-styles[2.2.2].    - tijsverkoyen/css-to-inline-styles 2.2.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.  Problem 2    - Installation request for phar-io/manifest 1.0.3 -> satisfiable by phar-io/manifest[1.0.3].    - phar-io/manifest 1.0.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.  Problem 3    - Installation request for phpunit/php-code-coverage 7.0.10 -> satisfiable by phpunit/php-code-coverage[7.0.10].    - phpunit/php-code-coverage 7.0.10 requires ext-dom * -> the requested PHP extension dom is missing from your system.  Problem 4    - Installation request for phpunit/phpunit 8.5.4 -> satisfiable by phpunit/phpunit[8.5.4].    - phpunit/phpunit 8.5.4 requires ext-dom * -> the requested PHP extension dom is missing from your system.  Problem 5    - Installation request for theseer/tokenizer 1.1.3 -> satisfiable by theseer/tokenizer[1.1.3].    - theseer/tokenizer 1.1.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.  Problem 6    - tijsverkoyen/css-to-inline-styles 2.2.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.    - laravel/framework v7.10.2 requires tijsverkoyen/css-to-inline-styles ^2.2.2 -> satisfiable by tijsverkoyen/css-to-inline-styles[2.2.2].    - Installation request for laravel/framework v7.10.2 -> satisfiable by laravel/framework[v7.10.2].  To enable extensions, verify that they are enabled in your .ini files:  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
查看完整描述

1 回答

?
红糖糍粑

TA贡献1815条经验 获得超6个赞

在 Ubuntu 上安装过程中出现问题。我添加了这个 php 扩展并且它起作用了。

sudo apt-get install php-xml


查看完整回答
反对 回复 2023-03-04
  • 1 回答
  • 0 关注
  • 128 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信