LoginSignup
4
3

More than 3 years have passed since last update.

MacOS High SierraでPHP5.3のインストール

Last updated at Posted at 2019-09-04

環境情報

  • MacOS High Sierra 10.13.6
  • Homebrew 2.1.11
  • phpenv v0.9.0-rc.1
  • php 5.3.29

phpenvでPHP5.3.29をインストール

以下のエラーで、インストールに失敗した。
autoconfのバージョン2.59以下を使用する必要がある。
現在のバージョンは、2.69を使用している。

-----------------
|  BUILD ERROR  |
-----------------

Here are the last 10 lines from the log:

-----------------------------------------
make: *** [buildmk.stamp] Error 1
Failed to run 'buildconf'.
Forcing buildconf
buildconf: checking installation...
buildconf: You need autoconf 2.59 or lower to build this version of PHP.
           You are currently trying to use 2.69
           Most distros have separate autoconf 2.13 or 2.59 packages.
           On Debian/Ubuntu both autoconf2.13 and autoconf2.59 packages exist.
           Install autoconf2.13 and set the PHP_AUTOCONF env var to
           autoconf2.13 and try again.
-----------------------------------------

使用しているautoconfのバージョンを確認する

バージョンを確認したところ、2.69を使用している。

# brew list autoconf
/usr/local/Cellar/autoconf/2.69/bin/autoconf

brewで2.59以下のバージョンを探す

brewで2.59以下のバージョンがインストールできないか確認する。
2.13があるようなので今回はこちらを使用。

# brew search autoconf                                                                                         
==> Formulae
autoconf ✔ autoconf-archive  autoconf@2.13

autoconf2.13をインストール

autoconfのインストール。

brew install autoconf@2.13

autoconf2.13のインストールを確認する

インストールが完了したか、確認してみる。

ls -al /usr/local/opt/autoconf@2.13/bin/autoconf213

環境変数をexportしてインストールする

環境変数をPHP_AUTOCONFでexportし、インストールすればインストールが完了する。

export PHP_AUTOCONF=/usr/local/opt/autoconf@2.13/bin/autoconf213
phpenv install 5.3.29

関連

phpenvで5.6と7.2の開発環境を準備する

4
3
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
4
3