系统:
MacOS 10.12.6
ZendStudio 使用外部composer有个讲究,应该使用/usr/local/Cellar/composer/1.4.2/libexec/composer.phar文件而不应该使用/usr/local/Cellar/composer/1.4.2/libexec/composer,因为composer是个shell脚本,会干一些事情,比如定义环境变量等等,会导致一系列的错乱,例如下面的错误:
Failed loading /Applications/Zend Studio.app/Contents/Eclipse/plugins/com.zend.php.executables.macosx_7.1.3.201703171134/resources/ext/ZendDebugger.so: dlopen(/Applications/Zend Studio.app/Contents/Eclipse/plugins/com.zend.php.executables.macosx_7.1.3.201703171134/resources/ext/ZendDebugger.so, 9): Library not loaded: /usr/local/openssl-1.0.2k/lib/libssl.1.0.0.dylib Referenced from: /Applications/Zend Studio.app/Contents/Eclipse/plugins/com.zend.php.executables.macosx_7.1.3.201703171134/resources/ext/ZendDebugger.so Reason: image not found
由于使用composer脚本导致/usr/local/openssl-1.0.2k/lib/libssl.1.0.0.dylib找不到,正确位置应该是:
/Applications/Zend Studio.app/Contents/Eclipse/plugins/com.zend.php.executables.macosx_7.1.3.201703171134/resources/libssl.1.0.0.dylib
使用composer.phar解决问题。
ps:使用外部composer和中国镜像会有一系列的好处。