macbookpro 下安装php7 limxml2 checking whether libxml build&

macbook pro 下安装php7 limxml2 checking whether libxml build works... no

环境:
是用brew 安装的libxml2

用brew安装前最好更新一下
# brew update

sudo brew install libxml2

==> Downloading https://homebrew.bintray.com/bottles/libxml2-2.9.3.el_capitan.bo

######################################################################## 100.0%

==> Pouring libxml2-2.9.3.el_capitan.bottle.tar.gz

==> Caveats

This formula is keg-only, which means it was not symlinked into /usr/local.

OS X already provides this software and installing another version in

parallel can cause all kinds of trouble.

Generally there are no consequences of this for you. If you build your

own software and it requires this formula, you'll need to add to your

build variables:

LDFLAGS: -L/usr/local/opt/libxml2/lib

CPPFLAGS: -I/usr/local/opt/libxml2/include

==> Summary

🍺 /usr/local/Cellar/libxml2/2.9.3: 276 files, 9.8M

# cd php-7.0.6

# ./configure --with-libxml-dir=/usr/local/Cellar/libxml2/2.9.3/

通过--with-libxml-dir指定libxml2的安装位置

.......

Thank you for using PHP.

config.status: creating php7.spec

config.status: creating main/build-defs.h

config.status: creating scripts/phpize

config.status: creating scripts/man1/phpize.1

config.status: creating scripts/php-config

config.status: creating scripts/man1/php-config.1

config.status: creating sapi/cli/php.1

config.status: creating sapi/cgi/php-cgi.1

config.status: creating ext/phar/phar.1

config.status: creating ext/phar/phar.phar.1

config.status: creating main/php_config.h

config.status: executing default commands

成功

===============

brew安装PHP提示Cannot find OpenSSL's ?

是因为php 调用的openssl是系统的,需要指定:

--with-openssl-dir=/usr/local/Cellar/openssl/1.0.2h/ --with-openssl=/usr/local/Cellar/openssl/1.0.2h/

发表评论

电子邮件地址不会被公开。 必填项已用*标注