Php 无法在Cygwin上全局安装composer

Php 无法在Cygwin上全局安装composer,php,json,xampp,composer-php,phar,Php,Json,Xampp,Composer Php,Phar,当我在Cygwin终端上运行this命令“php-r”readfile(“”);“|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 json extension is missing. Install it or r

当我在Cygwin终端上运行this命令“php-r”readfile(“”);“|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 json extension is missing.
Install it or recompile php without --disable-json

The phar extension is missing. 
Install it or recompile php without --disable-phar

The iconv OR mbstring extension is required and both are missing.
Install either of them or recompile php without --disable-iconv

但是,所有这些扩展都是在php.ini文件中启用的。我正在使用XAMPP。

我认为您需要安装正确的php扩展

apt-cyg install \
php \
php-json \
php-phar \
php-mysql \
php-curl \
php-gd \
php-intl \
php-imap \
php-mcrypt \
php-pspell \
php-recode \
php-tidy \
php-xmlrpc \
php-xsl

PS:我为此创建了一个安装脚本:)

Brilliant。。我不知道你对Cygwin很有吸引力。。以及你如何把它放在那里,完成后将其移除。。哇!而且你还发现了猞猁的用途!