$composer global require xx -vvv
Changed current directory to /Users/didi/.composer
Loading config file /Users/didi/.composer/config.json
Loading config file /Users/didi/.composer/auth.json
Reading /Users/didi/.composer/composer.json
Loading config file /Users/didi/.composer/config.json
Loading config file /Users/didi/.composer/auth.json
Loading config file /Users/didi/.composer/composer.json
Loading config file /Users/didi/.composer/auth.json
Reading /Users/didi/.composer/auth.json
Segmentation fault: 11
lldb -c 打开
openssl.so was compiled with optimization - stepping may behave oddly; variables may not be available.
php installer –version=1.4.1
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
cd PhpstormProjects/c/php-src/
make clean
./configure –with-openssl
make -j4
make install
$php installer –version=1.4.1
All settings correct for using Composer
Downloading…
Composer (version 1.4.1) successfully installed to: /Users/didi/PhpstormProjects/php/IDL/composer.phar
Use it: php composer.phar
问题解决
反思
问题原因,虽然openssl 扩展编译痛过了,但是由于环境原因,导致core
保险的方式是
重新brew install openssl
然后./configure –with-openssl
vi /usr/local/lib/php.ini
openssl.cafile=/usr/local/ssl/cert.pem
include_path=”.:/Users/didi/pear/share/pear”
扩展有两种方式
1,和php 源码一起编译
./configure –with-openssl
2,单独编译
so形式加入php.ini
需要注意的是openssl 需要配合一些其他配置
https://www.cnblogs.com/kenshinobiy/p/7412455.html
https://learnku.com/docs/php-internals/php7/building_extensions/6849