LoginSignup
7
4

More than 3 years have passed since last update.

EC-CUBE 4.0をローカル環境でMacにインストールする

Last updated at Posted at 2019-02-25

homebrewでcomposerのインストール🍺

composerがインストールされているか確認します🍺

$ brew search composer
==> Formulae
composer

composerをインストール

$ brew install composer
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

Error: An exception occurred within a child process:
  CompilerSelectionError: composer cannot be built with any available compilers.
Install GNU's GCC

xcrunエラー解消するため、xcode-selectをインストールします

$ xcode-select --install

gccをインストールするようエラーが出たので従います

$ brew install gcc

改めてcomposerをインストール

$ brew install composer

実行して確認します

$ composer
   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                    /_/
Composer version 1.8.4 2019-02-11 10:52:10

ようやくインストールに成功😴

EC-CUBE 4.0のインストール

EC-CUBEの公式サイトにインストール方法は紹介されています
インストール方法|EC-CUBE 4.0 開発ドキュメント

EC-CUBE 4.0をインストール

$ composer create-project ec-cube/ec-cube ec-cube "4.0.x-dev" --keep-vcs

エラーが出ました😅

  Problem 1
    - The requested PHP extension ext-intl ^1.1 is missing from your system. Install or enable PHP's intl extension.

Homebrewで最新のPHPをインストール

$ brew install php@7.1

画面の指示通りにインストールしたPHPにパスを通す

$ echo 'export PATH="/usr/local/opt/php@7.1/bin:$PATH"' >> ~/.bash_profile
$ echo 'export PATH="/usr/local/opt/php@7.1/sbin:$PATH"' >> ~/.bash_profile
$ source ~/.bash_profile

確認

$ which php
/usr/local/opt/php@7.1/bin/php
$php -m | grep intl
intl

改めてインストール

$ composer create-project ec-cube/ec-cube ec-cube "4.0.x-dev" --keep-vcs

しばらく時間はかかりますがインストール成功しました😆
お疲れ様でした!

7
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
4