我已经安装了OpenSSL 1.0.1j /usr/local/ssl
,现在我正在尝试使用这个版本的OpenSSL编译PHP 5.5.19.这是我配置的程序...
export CFLAGS="-arch x86_64" export CXXFLAGS="-arch x86_64" export LDFLAGS="-L/usr/local/ssl/lib" export CPPFLAGS="-I/usr/local/ssl/include" ./configure \ --prefix=/usr/local/php5 \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --sysconfdir=/etc \ --with-config-file-path=/etc \ --with-zlib \ --with-zlib-dir=/usr \ --with-apxs2=/usr/sbin/apxs \ --with-openssl=/usr/local/ssl \ --without-iconv \ --enable-cli \ --enable-exif \ --enable-ftp \ --enable-mbstring \ --enable-mbregex \ --enable-sockets \ --with-mysql=mysqlnd \ --with-pdo-mysql=mysqlnd \ --with-mysqli=mysqlnd \ --with-gd \ --with-jpeg-dir=/usr/local/lib \ --with-png-dir=/usr/X11R6 \ --with-freetype-dir=/usr/X11R6 \ --with-xpm-dir=/usr/X11R6 \ --with-mcrypt \ --with-curl
配置过程似乎工作正常,但是当我运行make时,我得到了这个:
Undefined symbols for architecture x86_64: "_PKCS5_PBKDF2_HMAC", referenced from: _zif_openssl_pbkdf2 in openssl.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [libs/libphp5.bundle] Error 1
如果我运行相同的配置选项,但将openssl指向系统版本/ usr
... --with-openssl=/usr ...
然后运行没有问题和PHP安装很好,但使用旧版本的OpenSSL.如何才能使用我的新版OpenSSL?