composer 安装时出错 报openssl you should enable it or recompile php with --with-openssl

please review and fix the issues listed below then try again
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

QQ截图20141224203342.jpg
已邀请:

codefamily

赞同来自:

平安夜在线等以表诚心

codefamily

赞同来自:

已经过去一个小时…………。

qufo

赞同来自:

骚年,放弃吧。去买颗苹果随便送给哪位心仪的姑娘吧。

codefamily

赞同来自:

哈哈 兄弟
正确的做法是在php的安装目录比如说C:\wamp\bin\php\php5.3.3\中,找到找个目录下的php.ini文件,然后去掉 extension=php_openssl.dll 这一行开头的注释,之后就可以顺利安装Composer了。

codefamily

赞同来自:

那么问题又来了

QQ截图20141224215104.jpg


C:\Users\Auser>composer -v
PHP Fatal error: Uncaught exception 'PharException' with message 'phar "C:\Prog
ramData\ComposerSetup\bin\composer.phar" has a broken signature' in C:\ProgramDa
ta\ComposerSetup\bin\composer.phar:23
Stack trace:

0 C:\ProgramData\ComposerSetup\bin\composer.phar(23): Phar::mapPhar('composer.p

har')

1 {main}

thrown in C:\ProgramData\ComposerSetup\bin\composer.phar on line 23

Fatal error: Uncaught exception 'PharException' with message 'phar "C:\ProgramDa
ta\ComposerSetup\bin\composer.phar" has a broken signature' in C:\ProgramData\Co
mposerSetup\bin\composer.phar:23
Stack trace:

0 C:\ProgramData\ComposerSetup\bin\composer.phar(23): Phar::mapPhar('composer.p

har')

1 {main}

thrown in C:\ProgramData\ComposerSetup\bin\composer.phar on line 23

qufo

赞同来自:

先 self-update 吧骚年。

codefamily

赞同来自:

不行没有这样的命令呢

QQ截图20141224224311.jpg

codefamily

赞同来自:

(命令:composer selfupdate » 用这条命令也会出错

motecshine - 菜鸟

赞同来自:

你需要把PHP版本升到首先 5.4.×以上,然后开启 openssl,WAMP升级比较麻烦,你要用PHPSTUDY,生产环境建议 linux+nginx+mysql+php。compser的安装在WIN下是自动设置在环境变量里的,如果composer 出错卸载原先的composer重装,

要回复问题请先登录注册