Centos系统, 刚开始用lnmp装的PHP环境,本来是要安装composer的,但是在这行这个命令的时候
curl -sS https://getcomposer.org/installer | php
就报错了:
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
The openssl extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl
不能忍啊,于是就给php安装openssl扩展,首先进入PHP源码包的ext/openssl目录下,执行以下命令,参见:http://www.52jscn.com/web/2013/05/4592.shtml
mv config0.m4 config.m4 /var/www/php5/bin/phpize ./configure --with-openssl --with-php-config=/path/to/php5/bin/php-config make make install
果断生成openssl.so,于是添加到php.ini中,执行service php-fpm restart,果断报错:openssl是未识别的PHP扩展。
接着折腾,参见:http://www.cnblogs.com/ycoe/archive/2012/02/15/2352604.html
在php源码目录上使用 ./configure --help查看配置所有可用参数,可以发现,找不到 --enable-ssl 取而代之的是: --with-openssl-dir --with-openssl 既然如此,就直接用它了 ./configure --with-openssl-dir=/usr/lib/openssl --with-openssl
目前仍在编译中~~~~