Ubuntuのcomposer installエラー

2020年1月10日金曜日

Laravel Linux

t f B! P L
Ubuntu
作成済みのLaravelのプロジェクトをgitからUbuntu18.04.1環境にクローンした後、composer installを行うと次のようなエラーが発生しました。

$composer install
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 phar-io/manifest 1.0.1 -> satisfiable by phar-io/manifest[1.0.1].
    - phar-io/manifest 1.0.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
  Problem 2
    - Installation request for phpunit/php-code-coverage 5.3.2 -> satisfiable by phpunit/php-code-coverage[5.3.2].
    - phpunit/php-code-coverage 5.3.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.
  Problem 3
    - Installation request for phpunit/phpunit 6.5.14 -> satisfiable by phpunit/phpunit[6.5.14].
    - phpunit/phpunit 6.5.14 requires ext-dom * -> the requested PHP extension dom is missing from your system.
  Problem 4
    - 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.

  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.


解決方法はstackoverflowのこちらの記事の通りなのですが、php-xmlをインストールするだけでエラーが無くなりました。

 sudo apt-get install php-xml

php-xmlをインストール後、再度composer installを実行すると、問題なく必要なファイルがインストールされました。

$composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 75 installs, 0 updates, 0 removals
  - Installing kylekatarnls/update-helper (1.1.1): Downloading (100%)
  - Installing symfony/thanks (v1.1.0): Downloading (100%)
  - Installing doctrine/inflector (v1.2.0): Downloading (100%)
  - Installing doctrine/lexer (1.0.2): Downloading (100%)
  - Installing erusev/parsedown (1.7.3): Downloading (100%)
  - Installing symfony/polyfill-ctype (v1.11.0): Downloading (100%)
  - Installing vlucas/phpdotenv (v2.6.1): Downloading (100%)
  - Installing symfony/css-selector (v3.4.29): Downloading (100%)
  - Installing tijsverkoyen/css-to-inline-styles (2.2.1): Downloading (100%)
  - Installing symfony/polyfill-mbstring (v1.11.0): Downloading (100%)
  - Installing symfony/var-dumper (v3.4.29): Downloading (100%)
  - Installing symfony/routing (v3.4.29): Downloading (100%)
  - Installing symfony/process (v3.4.29): Downloading (100%)
  - Installing paragonie/random_compat (v9.99.99): Downloading (100%)
  - Installing symfony/polyfill-php70 (v1.11.0): Downloading (100%)
  - Installing symfony/http-foundation (v3.4.29): Downloading (100%)
  - Installing symfony/event-dispatcher (v3.4.29): Downloading (100%)
  - Installing psr/log (1.1.0): Downloading (100%)
  - Installing symfony/debug (v3.4.29): Downloading (100%)
  - Installing symfony/http-kernel (v3.4.29): Downloading (100%)
  - Installing symfony/finder (v3.4.29): Downloading (100%)
  - Installing symfony/console (v3.4.29): Downloading (100%)
  - Installing symfony/polyfill-php72 (v1.11.0): Downloading (100%)
  - Installing symfony/polyfill-intl-idn (v1.11.0): Downloading (100%)
  - Installing symfony/polyfill-iconv (v1.11.0): Downloading (100%)
  - Installing egulias/email-validator (2.1.10): Downloading (100%)
  - Installing swiftmailer/swiftmailer (v6.2.1): Downloading (100%)
  - Installing ramsey/uuid (3.8.0): Downloading (100%)
  - Installing psr/simple-cache (1.0.1): Downloading (100%)
  - Installing psr/container (1.0.0): Downloading (100%)
  - Installing symfony/translation (v3.4.29): Downloading (100%)
  - Installing nesbot/carbon (1.39.0): Downloading (100%)
  - Installing mtdowling/cron-expression (v1.2.1): Downloading (100%)
  - Installing monolog/monolog (1.24.0): Downloading (100%)
  - Installing league/flysystem (1.0.53): Downloading (100%)
  - Installing laravel/framework (v5.5.46): Downloading (100%)
  - Installing fideloper/proxy (3.3.4): Downloading (100%)
  - Installing jakub-onderka/php-console-color (v0.2): Downloading (100%)
  - Installing nikic/php-parser (v4.2.2): Downloading (100%)
  - Installing jakub-onderka/php-console-highlighter (v0.4): Downloading (100%)
  - Installing dnoegel/php-xdg-base-dir (0.1): Downloading (100%)
  - Installing psy/psysh (v0.9.9): Downloading (100%)
  - Installing laravel/tinker (v1.0.8): Downloading (100%)
  - Installing filp/whoops (2.4.1): Downloading (100%)
  - Installing fzaninotto/faker (v1.8.0): Downloading (100%)
  - Installing hamcrest/hamcrest-php (v2.0.0): Downloading (100%)
  - Installing mockery/mockery (1.2.2): Downloading (100%)
  - Installing webmozart/assert (1.4.0): Downloading (100%)
  - Installing phpdocumentor/reflection-common (1.0.1): Downloading (100%)
  - Installing phpdocumentor/type-resolver (0.4.0): Downloading (100%)
  - Installing phpdocumentor/reflection-docblock (4.3.1): Downloading (100%)
  - Installing phpunit/php-token-stream (2.0.2): Downloading (100%)
  - Installing sebastian/version (2.0.1): Downloading (100%)
  - Installing sebastian/resource-operations (1.0.0): Downloading (100%)
  - Installing sebastian/recursion-context (3.0.0): Downloading (100%)
  - Installing sebastian/object-reflector (1.1.1): Downloading (100%)
  - Installing sebastian/object-enumerator (3.0.3): Downloading (100%)
  - Installing sebastian/global-state (2.0.0): Downloading (100%)
  - Installing sebastian/exporter (3.1.0): Downloading (100%)
  - Installing sebastian/environment (3.1.0): Downloading (100%)
  - Installing sebastian/diff (2.0.1): Downloading (100%)
  - Installing sebastian/comparator (2.1.3): Downloading (100%)
  - Installing phpunit/php-text-template (1.2.1): Downloading (100%)
  - Installing doctrine/instantiator (1.0.5): Downloading (100%)
  - Installing phpunit/phpunit-mock-objects (5.0.10): Downloading (100%)
  - Installing phpunit/php-timer (1.0.9): Downloading (100%)
  - Installing phpunit/php-file-iterator (1.4.5): Downloading (100%)
  - Installing theseer/tokenizer (1.1.3): Downloading (100%)
  - Installing sebastian/code-unit-reverse-lookup (1.0.1): Downloading (100%)
  - Installing phpunit/php-code-coverage (5.3.2): Downloading (100%)
  - Installing phpspec/prophecy (1.8.1): Downloading (100%)
  - Installing phar-io/version (1.0.1): Downloading (100%)
  - Installing phar-io/manifest (1.0.1): Downloading (100%)
  - Installing myclabs/deep-copy (1.7.0): Downloading (100%)
  - Installing phpunit/phpunit (6.5.14): Downloading (100%)
symfony/var-dumper suggests installing ext-intl (To show region name in time zone dump)
:(中略)
> @php artisan package:discover
Discovered Package: fideloper/proxy
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Package manifest generated successfully.

このブログを検索

ブログアーカイブ

QooQ