Skip to content

Instantly share code, notes, and snippets.

@gohan-999
Last active August 29, 2015 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gohan-999/c6f6a02e2e2fff550f3f to your computer and use it in GitHub Desktop.
Save gohan-999/c6f6a02e2e2fff550f3f to your computer and use it in GitHub Desktop.
phpenv+php-build環境によるphpバージョン管理~Mac(Yosemite)編~ ref: http://qiita.com/omega999/items/c5b1c177331f8d342efd
#rbenv
export RBENV_ROOT="/usr/local/rbenv"
PATH="$RBENV_ROOT/bin:$PATH"
#phpenv
export PHPENV_ROOT="/usr/local/phpenv"
PATH="$PATH:$PHPENV_ROOT/bin"
export PATH
eval "$(rbenv init -)"
eval "$(phpenv init -)"
$ php -v
PHP 5.6.2 (cli) (built: Dec 26 2014 17:55:30)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
with Xdebug v2.2.6, Copyright (c) 2002-2014, by Derick Rethans
configure: WARNING: bison versions supported for regeneration of the Zend/PHP ~~なんちゃら
configure: error: jpeglib.h not found.
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
{
$PREFIX/bin/phpize
"$(pwd)/configure" --enable-xdebug \
--with-php-config=$PREFIX/bin/php-config
make
make install
} >&4 2>&1
$ phpenv install 5.6.2
[Info]: Loaded apc Plugin.
[Info]: Loaded composer Plugin.
[Info]: Loaded pyrus Plugin.
[Info]: Loaded xdebug Plugin.
[Info]: Loaded xhprof Plugin.
[Info]: php.ini-production gets used as php.ini
[Info]: Building 5.6.2 into /Users/username/.phpenv/versions/5.6.2
[Skipping]: Already downloaded and extracted http://php.net/distributions/php-5.6.2.tar.bz2
[Pyrus]: Downloading from http://pear2.php.net/pyrus.phar
[Pyrus]: Installing executable in /Users/username/.phpenv/versions/5.6.2/bin/pyrus
[XDebug]: Downloading http://xdebug.org/files/xdebug-2.2.6.tgz
[XDebug]: Compiling in /var/tmp/php-build/source/xdebug-2.2.6
-----------------
| BUILD ERROR |
-----------------
Here are the last 10 lines from the log:
-----------------------------------------
^
/usr/include/math.h:718:12: note: 'finite' has been explicitly marked deprecated here
extern int finite(double) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_9, __IPHONE_NA, __IPHONE_NA);
^
1 warning generated.
/var/tmp/php-build/source/5.6.2/Zend/zend_string.c:65:28: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
CG(interned_empty_string) = zend_new_interned_string_int("", sizeof(""), 0 TSRMLS_CC);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
-----------------------------------------
The full Log is available at '/tmp/php-build.5.6.2.20141226031942.log'.
[Warn]: Aborting build.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment