[Php] windows下使用composer出現SHA384 is not supported by your openssl extension

composer的版本過低了,須要更新composer
windows的安裝使用
https://getcomposer.org/Composer-Setup.exe
報這個錯Failed to decode zlib stream,把下面的composer.phar移動到php.exe所在目錄,重試就行了php

linux下用下面的命令行從新安裝,windows下也能夠用
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'a5c698ffe4b8e849a443b120cd5ba38043260d5c4023dbf93e1558871f1f07f58274fc6f4c93bcfd858c6bd0775cd8d1') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
能夠直接把目錄下的composer.phar移動到/usr/bin/composerlinux

 

php的版本也要比較高的版本windows

 

相關文章
相關標籤/搜索