gpt4 book ai didi

php - 无法安装php包?

转载 作者:行者123 更新时间:2023-12-04 18:24:58 26 4
gpt4 key购买 nike

这个问题在这里已经有了答案:





PHP7 : install ext-dom issue

(3 个回答)


2年前关闭。




我从 GitHub 克隆了一个项目,并尝试使用我已经安装的 Composer 安装包,没有任何问题。
我运行 Composer 安装。
不幸的是,我遇到了这些我无法弄清楚的错误,我该怎么办?

    Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your 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:
- /etc/php/7.2/cli/php.ini
- /etc/php/7.2/cli/conf.d/10-opcache.ini
- /etc/php/7.2/cli/conf.d/10-pdo.ini
- /etc/php/7.2/cli/conf.d/20-calendar.ini
- /etc/php/7.2/cli/conf.d/20-ctype.ini
- /etc/php/7.2/cli/conf.d/20-exif.ini
- /etc/php/7.2/cli/conf.d/20-fileinfo.ini
- /etc/php/7.2/cli/conf.d/20-ftp.ini
- /etc/php/7.2/cli/conf.d/20-gettext.ini
- /etc/php/7.2/cli/conf.d/20-iconv.ini
- /etc/php/7.2/cli/conf.d/20-json.ini
- /etc/php/7.2/cli/conf.d/20-mbstring.ini
- /etc/php/7.2/cli/conf.d/20-phar.ini
- /etc/php/7.2/cli/conf.d/20-posix.ini
- /etc/php/7.2/cli/conf.d/20-readline.ini
- /etc/php/7.2/cli/conf.d/20-shmop.ini
- /etc/php/7.2/cli/conf.d/20-sockets.ini
- /etc/php/7.2/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.2/cli/conf.d/20-sysvsem.ini
- /etc/php/7.2/cli/conf.d/20-sysvshm.ini
- /etc/php/7.2/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

最佳答案

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

sudo apt-get install php-xml

关于php - 无法安装php包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61669841/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com