やったこと
composer init composer clear-cache composer require twig/twig:^3.0
結果
Do not run Composer as root/super user! See https://getcomposer.org/root for details Using version ^3.0 for twig/twig ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 3 installs, 0 updates, 0 removals As there is no 'unzip' command installed zip files are being unpacked using the PHP zip extension. This may cause invalid reports of corrupted archives. Besides, any UNIX permissions (e.g. executable) defined in the archives will be lost. Installing 'unzip' may remediate them. - Installing symfony/polyfill-ctype (v1.13.1): Loading from cache - Installing symfony/polyfill-mbstring (v1.13.1): Loading from cache - Installing twig/twig (v3.0.1): Loading from cache Generating autoload files Installation failed, reverting ./composer.json to its original content. [ErrorException] require(/mnt/project/virtual/htdocs/www/admin/vendor/composer/../symfony/polyfill-ctype/bootstrap.php): failed to open stream: No such file or directory require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...
ディレクトリ構成
www/ admin/ application/ public/ index.php vendor/ composer/ autoload_classmap.phpなど autoload.php composer.json
環境情報
- PHP 7.4.2 (cli)
- CentOS Linux release 7.7.1908 (Core)
- Apache/2.4.6 (CentOS)
- Composer version 1.9.3
twigが依存しているpolyfill-ctypeというライブラリが
プロジェクトディレクトリ内に存在しないことで発生しているエラー?
通常、vendorディレクトリの下に各種ライブラリがあるはずですが、
現時点ではcomposerのライブラリだけがある状況です。
何がいけないのでしょうか。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。