【问题标题】:Updating Composer in Digital Ocean Ubuntu via Terminal errors通过终端错误在 Digital Ocean Ubuntu 中更新 Composer
【发布时间】:2020-07-29 04:32:24
【问题描述】:

我使用的是 mac 并且在命令行中,我已登录到服务器,并且想要安装 composer,但是我遇到了一些问题(见下文)。我不需要 PHP 单元,所以我也尝试过composer install --no-dev,但出现了同样的错误。有什么想法或解决方案吗?

Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
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
    - tijsverkoyen/css-to-inline-styles 2.2.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - laravel/framework v7.3.0 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.3.0 -> satisfiable by laravel/framework[v7.3.0].

我还尝试通过 Sudo 安装 tijsverkoyen 并收到另一个问题列表

Problem 1
    - phpunit/phpunit 8.5.x-dev requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 8.5.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 8.5.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 8.5.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - phpunit/phpunit 8.5.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.
    - Installation request for phpunit/phpunit ^8.5 -> satisfiable by phpunit/phpunit[8.5.0, 8.5.1, 8.5.2, 8.5.3, 8.5.x-dev].

【问题讨论】:

    标签: php ubuntu terminal composer-php digital-ocean


    【解决方案1】:

    错误消息显示您缺少 PHP 扩展 ext-dom

    您需要通过运行sudo apt install php-xml 来安装它。

    【讨论】:

      猜你喜欢
      • 2015-09-07
      • 1970-01-01
      • 2020-03-25
      • 1970-01-01
      • 2018-03-06
      • 2016-02-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多