CakePHP3のインストールしてみたらエラーになった

CakePHP3をインストールしてみる。

インストール対象はWindows8。前提として、XAMPPとComposerはインストール済み。

以下のコマンドをコマンドプロンプトから実施した(このコマンドはCakePHP3のインストールコマンドとしては間違っている)。


composer create-project

実施したところ、以下のエラーメッセージが表示された。


$composer create-project
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 3.3.9 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/cakephp 3.3.8 requires ext-intl * -> the requested PHP extension itl is missing from your system.
    - cakephp/cakephp 3.3.7 requires ext-intl * -> the requested PHP extension itl is missing from your system.
    - cakephp/cakephp 3.3.6 requires ext-intl * -> the requested PHP extension itl is missing from your system.
    - cakephp/cakephp 3.3.5 requires ext-intl * -> the requested PHP extension itl is missing from your system.
    - cakephp/cakephp 3.3.4 requires ext-intl * -> the requested PHP extension itl is missing from your system.
    - cakephp/cakephp 3.3.3 requires ext-intl * -> the requested PHP extension itl is missing from your system.
    - cakephp/cakephp 3.3.2 requires ext-intl * -> the requested PHP extension itl is missing from your system.
    - cakephp/cakephp 3.3.11 requires ext-intl * -> the requested PHP extensionntl is missing from your system.
    - cakephp/cakephp 3.3.10 requires ext-intl * -> the requested PHP extensionntl is missing from your system.
    - cakephp/cakephp 3.3.1 requires ext-intl * -> the requested PHP extension itl is missing from your system.
    - cakephp/cakephp 3.3.0 requires ext-intl * -> the requested PHP extension itl is missing from your system.
    - Installation request for cakephp/cakephp ~3.3 -> satisfiable by cakephp/cakephp[3.3.0, 3.3.1, 3.3.10, 3.3.11, 3.3.2, 3.3.3, 3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9].

  To enable extensions, verify that they are enabled in your .ini files:
    - C:\xampp\php\php.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

原因は、php.iniの「;extension=php_intl.dll」がコメントアウトになっているから。これのコメントを外せば解決する。
CakePHP3のインストールのシステム要件にもきちんと記載があった。
https://book.cakephp.org/3.0/ja/installation.html#id2

コメント

タイトルとURLをコピーしました