Ubuntu 16.04+PHP7.1+CakePHP3.5.1の環境セットアップログ
端的に言うと、以下のモジュールはcomposerによるCakePHPのプロジェクト作成の前にやらないと以下のエラーがでます。
必須コマンド&PHPモジュール
zip, php-mbstring, php-xml
でたエラー
$ composer self-update && composer create-project --prefer-
dist cakephp/app my_app_name
You are already using composer version 1.5.1 (stable channel).
Installing cakephp/app (3.5.0)
Failed to download cakephp/app from dist: The zip extension and unzip command are both missing, skipping.
The php.ini used by your command-line PHP is: /etc/php/7.1/cli/php.ini
Now trying to download from source
- Installing cakephp/app (3.5.0): Cloning f807e4ef14 from cache
Created project in my_app_name
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- cakephp/cakephp-codesniffer 3.0.0 requires squizlabs/php_codesniffer ^3.0.0 -> satisfiable by squizlabs/php_codesniffer[3.0.0, 3.0.1, 3.0.2].
- cakephp/cakephp-codesniffer 3.0.1 requires squizlabs/php_codesniffer ^3.0.0 -> satisfiable by squizlabs/php_codesniffer[3.0.0, 3.0.1, 3.0.2].
- squizlabs/php_codesniffer 3.0.2 requires ext-simplexml * -> the requested PHP extension simplexml is missing from your system.
- squizlabs/php_codesniffer 3.0.1 requires ext-simplexml * -> the requested PHP extension simplexml is missing from your system.
- squizlabs/php_codesniffer 3.0.0 requires ext-simplexml * -> the requested PHP extension simplexml is missing from your system.
- Installation request for cakephp/cakephp-
セットアップ完了
ちょっと順番間違えると結構はまるので、ご注意ください。